Patch title: Release 90 bulk changes
Abstract:
File: /graphic/color/editor.page
Key:
    Removed line
    Added line
   
module "/pliant/language/unsafe.pli"
module "/pliant/language/compiler.pli"
module "/pliant/graphic/misc/float.pli"
module "/pliant/admin/file.pli"
module "/pliant/protocol/http/uvar.pli"
module "/pliant/graphic/misc/float.pli"
module "/pliant/admin/file.pli"
module "/pliant/protocol/http/uvar.pli"
module "/pliant/language/data/cache.pli"
module "database.pli"
module "spectrum.pli"
module "color.pli"
module "adjust.pli"
module "gradation.pli"
module "ink.pli"
module "gamut.pli"
module "spectro.pli"


page button "load new parameters"
module "database.pli"
module "spectrum.pli"
module "color.pli"
module "adjust.pli"
module "gradation.pli"
module "ink.pli"
module "gamut.pli"
module "spectro.pli"


page button "load new parameters"
  color_ink_cache_reset
  color_gamut_cache_reset
  file_tree_delete "data:/pliant/graphic/cache/"
  file_tree_delete "data:/pliant/graphic/cache/"
  color_version += 1
  cache_shrink 0 cache_class_costy
  reload_page


table columns 3
  cell header [Device]
  cell void
  cell header [Description]
  each d color_database:data:device
    cell
      text keyof:d
    cell
      text d:label
    cell
      page button "edit"
        title "Color device '"+keyof:d+"'"
        page note "printer settings used to build this profi
          title "Printer settings for '"+keyof:d+"' color pr
          var Data:ColorPrinter p :> d printer
          table columns 3 border 0
            cell [Driver:]
            cell
              input "" p:driver length 10
            cell
              [The filter is the Pliant driver.] ; eol
              [Most common filter are] ; fixed [ escp2 ] ; [
              fixed [ pcl ] ; [for HP Designjet (does not wo
              [and ] ; fixed [ gimprint ] ; [if the printer 
            cell [Model:]
            cell
              input "" p:model length 20
            cell
              [Must be one of the models the driver is aware
            cell [Extra options:]
            cell
              input "" p:options length 40
            cell
              [As an example, the] ; fixed [ escp2 ] ; [driv
            cell [Paper name:]
            cell
              input "" p:paper length 40 noeol
            cell
              [This is informative only.]
            cell [Paper size:]
            cell
              input "" p:size_x length 4 noeol
              input " x " p:size_y length 4 noeol
              [ mm]
            cell
              void
            cell [Margins:]
            cell
              input "L" p:margin_left length 3 noeol
              input "T" p:margin_top length 3 noeol
              input "R" p:margin_right length 3 noeol
              input "B" p:margin_bottom length 3 noeol
              [ mm]
            cell
              void
            cell [R鳯lution:]
            cell
              input "" p:resolution_x length 4 noeol
              input " x " p:resolution_y length 4 noeol
              [ dpi]
            cell
              void
            cell [Antialiasing:]
            cell
              input "" p:antialiasing_x length 1 noeol
              input " x " p:antialiasing_y length 1
            cell
              [Use no antialiasing if your computer is slow,
            cell [Sharpening:]
            cell
              input "" p:sharpening length 5
            cell
              [Leave it blank unless you want to experiment.
            cell [Maximum density:]
            cell
              input "" p:limit length 5
            cell
              [Leave it blank unless you know what you do: t
            cell [Middle adjustment:]
            cell
              input "" p:middle length 5
            cell
              [Leave it blank unless you know what you do: t
            cell [Gamut:]
            cell
              input "" p:gamut length 40
            cell
              void
            cell [Calibration steps:]
            cell
              input "" p:grid_steps length 2
            cell
              [How many steps do we compute on the calibrati
              [33 is perfect but will require several hours 
          button "Update"
            goto_backward
        table columns 2 border 0
          cell [Label:]
          cell
            input "" d:label length 60
          cell [Description:]
          cell
            text_input "" d:comment columns 60 rows 10
          cell [Gamut extra options:]
          cell
            input "" d:options length 60 noeol
            button "Update"
  reload_page


table columns 3
  cell header [Device]
  cell void
  cell header [Description]
  each d color_database:data:device
    cell
      text keyof:d
    cell
      text d:label
    cell
      page button "edit"
        title "Color device '"+keyof:d+"'"
        page note "printer settings used to build this profi
          title "Printer settings for '"+keyof:d+"' color pr
          var Data:ColorPrinter p :> d printer
          table columns 3 border 0
            cell [Driver:]
            cell
              input "" p:driver length 10
            cell
              [The filter is the Pliant driver.] ; eol
              [Most common filter are] ; fixed [ escp2 ] ; [
              fixed [ pcl ] ; [for HP Designjet (does not wo
              [and ] ; fixed [ gimprint ] ; [if the printer 
            cell [Model:]
            cell
              input "" p:model length 20
            cell
              [Must be one of the models the driver is aware
            cell [Extra options:]
            cell
              input "" p:options length 40
            cell
              [As an example, the] ; fixed [ escp2 ] ; [driv
            cell [Paper name:]
            cell
              input "" p:paper length 40 noeol
            cell
              [This is informative only.]
            cell [Paper size:]
            cell
              input "" p:size_x length 4 noeol
              input " x " p:size_y length 4 noeol
              [ mm]
            cell
              void
            cell [Margins:]
            cell
              input "L" p:margin_left length 3 noeol
              input "T" p:margin_top length 3 noeol
              input "R" p:margin_right length 3 noeol
              input "B" p:margin_bottom length 3 noeol
              [ mm]
            cell
              void
            cell [R鳯lution:]
            cell
              input "" p:resolution_x length 4 noeol
              input " x " p:resolution_y length 4 noeol
              [ dpi]
            cell
              void
            cell [Antialiasing:]
            cell
              input "" p:antialiasing_x length 1 noeol
              input " x " p:antialiasing_y length 1
            cell
              [Use no antialiasing if your computer is slow,
            cell [Sharpening:]
            cell
              input "" p:sharpening length 5
            cell
              [Leave it blank unless you want to experiment.
            cell [Maximum density:]
            cell
              input "" p:limit length 5
            cell
              [Leave it blank unless you know what you do: t
            cell [Middle adjustment:]
            cell
              input "" p:middle length 5
            cell
              [Leave it blank unless you know what you do: t
            cell [Gamut:]
            cell
              input "" p:gamut length 40
            cell
              void
            cell [Calibration steps:]
            cell
              input "" p:grid_steps length 2
            cell
              [How many steps do we compute on the calibrati
              [33 is perfect but will require several hours 
          button "Update"
            goto_backward
        table columns 2 border 0
          cell [Label:]
          cell
            input "" d:label length 60
          cell [Description:]
          cell
            text_input "" d:comment columns 60 rows 10
          cell [Gamut extra options:]
          cell
            input "" d:options length 60 noeol
            button "Update"
              color_version += 1
              cache_shrink 0 cache_class_costy
              goto_backward
            link "what do these options mean" "/pliant/graph
          
        table columns 5
          cell header [Ink]
          cell header [Sample]
          cell header [Opacity]
          cell void
          cell header [Options]
          each ch d:channel
            cell
              text keyof:ch
            var ColorSpectrum32 a_s0 := ch s0
            var ColorSpectrum32 a_s100 := ch s100
            if a_s0=defined and a_s100=defined
              cell color (cast (filter_XYZ a_s100/a_s0) Colo
                fixed [ ]
            else
              cell void
            cell
              if (ch:options option "opacity" Float)=defined
                text string:(ch:options option "opacity" Flo
            cell
              page button "edit"
                title "Ink '"+keyof:ch+"' for device '"+keyo
                var ColorSpectrum32 s0 := ch s0
                var ColorSpectrum32 s100 := ch s100
                var CBool composed := (keyof:ch search "+" -
              goto_backward
            link "what do these options mean" "/pliant/graph
          
        table columns 5
          cell header [Ink]
          cell header [Sample]
          cell header [Opacity]
          cell void
          cell header [Options]
          each ch d:channel
            cell
              text keyof:ch
            var ColorSpectrum32 a_s0 := ch s0
            var ColorSpectrum32 a_s100 := ch s100
            if a_s0=defined and a_s100=defined
              cell color (cast (filter_XYZ a_s100/a_s0) Colo
                fixed [ ]
            else
              cell void
            cell
              if (ch:options option "opacity" Float)=defined
                text string:(ch:options option "opacity" Flo
            cell
              page button "edit"
                title "Ink '"+keyof:ch+"' for device '"+keyo
                var ColorSpectrum32 s0 := ch s0
                var ColorSpectrum32 s100 := ch s100
                var CBool composed := (keyof:ch search "+" -
                var Float specular := ch:options+" "+d:optio
                var Float deaden := ch:options+" "+d:options option "deaden" Float 0
                var Int maxi := shunt (exists ch:sample:"255") 255 100
                if s0=defined and s100=defined
                  check ColorSpectrum32:size=32*Float32:size
                  table columns 4 border 0
                    cell
                      var Float mi := 1
                      var Float ma := 0
                      for (var Int w) 0 30
                if s0=defined and s100=defined
                  check ColorSpectrum32:size=32*Float32:size
                  table columns 4 border 0
                    cell
                      var Float mi := 1
                      var Float ma := 0
                      for (var Int w) 0 30
                        mi := min mi ((addressof:s100 transl
                        ma := max ma ((addressof:s100 transl
                      text "Reflexion range: "
                        mi := min mi (addressof:s100 map Float32 w)
                        ma := max ma (addressof:s100 map Float32 w)
                      text "Absolute reflexion range: "
                      fixed
                        text (string (cast mi*1000 Int)/1000
                      eol
                      fixed
                        text (string (cast mi*1000 Int)/1000
                      eol
                      var Float mi := 1
                      var Float ma := 0
                      for (var Int w) 0 30
                        mi := min mi (addressof:s100 map Float32 w)/(addressof:s0 map Float32 w)
                        ma := max ma (addressof:s100 map Float32 w)/(addressof:s0 map Float32 w)
                      text "Relative reflexion range: "
                      fixed
                        text (string (cast mi*1000 Int)/1000)+" "+(string (cast ma*1000 Int)/1000)
                      eol
                      var ColorXYZ xyz := filter_XYZ s100/s0
                      text "XYZ: "
                      fixed
                        text (string xyz:X "fixed 3")+" "+(s
                      eol
                      var ColorYxy yxy := cast xyz ColorYxy
                      text "Yxy: "
                      fixed
                        text (string yxy:Y "fixed 3")+" "+(s
                      eol
                      var ColorLab lab := cast xyz ColorLab
                      text "L*a*b*: "
                      fixed
                        text (string lab:L "fixed 1")+" "+(s
                      eol
                      var ColorXYZ xyz := filter_XYZ s100/s0
                      text "XYZ: "
                      fixed
                        text (string xyz:X "fixed 3")+" "+(s
                      eol
                      var ColorYxy yxy := cast xyz ColorYxy
                      text "Yxy: "
                      fixed
                        text (string yxy:Y "fixed 3")+" "+(s
                      eol
                      var ColorLab lab := cast xyz ColorLab
                      text "L*a*b*: "
                      fixed
                        text (string lab:L "fixed 1")+" "+(s
                      eol
                      text "Specular: "+(string specular "fi
                      text "Deaden: "+(string deaden "fixed 3")
                    var ColorXYZ paper := filter_XYZ s0
                    cell
                      [Paper:] ; eol
                      var ColorLCh lch := cast paper ColorLC
                      [L*C*h] ; small [ ab] ; eol
                      fixed
                        text (string lch:L "fixed 1") ; fixe
                      [Sample and spectrum ->]
                    cell
                      var ColorRGB888 rgb := cast paper Colo
                      image "sample/r"+string:(cast rgb:r In
                    cell
                      display_spectrum s0 (var ColorSpectrum
                input "Options: " ch:options length 60 noeol
                var Float display := ch:options option "dens
                page button "Update"
                    var ColorXYZ paper := filter_XYZ s0
                    cell
                      [Paper:] ; eol
                      var ColorLCh lch := cast paper ColorLC
                      [L*C*h] ; small [ ab] ; eol
                      fixed
                        text (string lch:L "fixed 1") ; fixe
                      [Sample and spectrum ->]
                    cell
                      var ColorRGB888 rgb := cast paper Colo
                      image "sample/r"+string:(cast rgb:r In
                    cell
                      display_spectrum s0 (var ColorSpectrum
                input "Options: " ch:options length 60 noeol
                var Float display := ch:options option "dens
                page button "Update"
                  color_version += 1
                  cache_shrink 0 cache_class_costy
                  goto_backward
                table columns (shunt composed 9 7)
                  cell header [Color]
                  cell header
                    [Linear[lf]Thickness[lf]Surface]
                  cell header [Density]
                  cell header [Opacity]
                  cell header [Sample]
                  cell header
                    [L*C*h] ; small [ ab]
                  if composed
                    cell header [computation[lf]color]
                    cell header [computation[lf]sample]
                  cell header
                    [Spectrum] ; eol
                    small [red is measured, green is compute
                  each sample ch:sample sort (right keyof:sa
                    cell
                      text keyof:sample
                    cell
                      if s0=defined
                        var ColorXYZ wished := filter_XYZ co
                      if s0=defined and s100=defined
                        var Float density := ink_linear colo
                        text (string density*100 "fixed 1")+
                        var ColorXYZ got := filter_XYZ (ink_
                        var Float err := lab_distance wished
                        fixed [ ] ; small { html "ΔE "
                        var Float err := cmc_distance wished
                        fixed [ ] ; small (text "CMC "+(stri
                        eol
                        var Float density := ink_thickness c
                        text (string density*100 "fixed 1")+
                        var ColorXYZ got := filter_XYZ (ink_
                        var Float err := lab_distance wished
                        fixed [ ] ; small { html "ΔE "
                        var Float err := cmc_distance wished
                        fixed [ ] ; small (text "CMC "+(stri
                        eol
                        var Float density := ink_surface col
                        text (string (cast density*1000 Int)
                        var ColorXYZ got := filter_XYZ (ink_
                        var Float err := lab_distance wished
                        fixed [ ] ; small { html "ΔE "
                        var Float err := cmc_distance wished
                        fixed [ ] ; small (text "CMC "+(stri
                    cell
                      if s0=defined and s100=defined
                        var Float density := ink_density col
                        bold (text (string (exposure density
                  goto_backward
                table columns (shunt composed 9 7)
                  cell header [Color]
                  cell header
                    [Linear[lf]Thickness[lf]Surface]
                  cell header [Density]
                  cell header [Opacity]
                  cell header [Sample]
                  cell header
                    [L*C*h] ; small [ ab]
                  if composed
                    cell header [computation[lf]color]
                    cell header [computation[lf]sample]
                  cell header
                    [Spectrum] ; eol
                    small [red is measured, green is compute
                  each sample ch:sample sort (right keyof:sa
                    cell
                      text keyof:sample
                    cell
                      if s0=defined
                        var ColorXYZ wished := filter_XYZ co
                      if s0=defined and s100=defined
                        var Float density := ink_linear colo
                        text (string density*100 "fixed 1")+
                        var ColorXYZ got := filter_XYZ (ink_
                        var Float err := lab_distance wished
                        fixed [ ] ; small { html "ΔE "
                        var Float err := cmc_distance wished
                        fixed [ ] ; small (text "CMC "+(stri
                        eol
                        var Float density := ink_thickness c
                        text (string density*100 "fixed 1")+
                        var ColorXYZ got := filter_XYZ (ink_
                        var Float err := lab_distance wished
                        fixed [ ] ; small { html "ΔE "
                        var Float err := cmc_distance wished
                        fixed [ ] ; small (text "CMC "+(stri
                        eol
                        var Float density := ink_surface col
                        text (string (cast density*1000 Int)
                        var ColorXYZ got := filter_XYZ (ink_
                        var Float err := lab_distance wished
                        fixed [ ] ; small { html "ΔE "
                        var Float err := cmc_distance wished
                        fixed [ ] ; small (text "CMC "+(stri
                    cell
                      if s0=defined and s100=defined
                        var Float density := ink_density col
                        bold (text (string (exposure density
                        if true
                          eol
                          var Float density0 := ink_density color_spectrum32:sample s0 s100 (the_function ink_density_simulation Float ColorSpectrum32 ColorSpectrum32 -> ColorSpectrum32) 0 1 (var Float err)
                          small (text (string (exposure density0 display)*100 "fixed 1")+"%")
                          eol
                          var Float density2 := ink_density color_spectrum32:sample s0 s100 (the_function ink_density_simulation Float ColorSpectrum32 ColorSpectrum32 -> ColorSpectrum32) 2 1 (var Float err)
                          small (text (string (exposure density2 display)*100 "fixed 1")+"%")
                    cell
                      text string:(sample option "opacity" F
                    cell
                      if s0=defined
                        var ColorRGB888 rgb := cast (filter_
                        image "sample/r"+string:(cast rgb:r 
                    cell
                      if s0=defined
                        var ColorLCh lch := cast wished Colo
                        text (string lch:L "fixed 1") ; fixe
                    if composed
                    cell
                      text string:(sample option "opacity" F
                    cell
                      if s0=defined
                        var ColorRGB888 rgb := cast (filter_
                        image "sample/r"+string:(cast rgb:r 
                    cell
                      if s0=defined
                        var ColorLCh lch := cast wished Colo
                        text (string lch:L "fixed 1") ; fixe
                    if composed
                      var ColorSpectrum32 s1
                      var Link:ColorGamut g :> color_gamut keyof:d+":"+keyof:ch "nocomposed"
                      if g=success and (keyof:sample parse (var Int level))
                        var ColorBuffer pixel1
                        for (var Int i) 0 gamut_maximum_dimension-1
                          pixel1:bytes i := level*255\maxi
                        s1 := g simulate2 addressof:pixel1
                      cell
                      cell
                        part compute_mixture
                          var ColorSpectrum32 s1 := cast 1 C
                          var Str all := keyof ch
                          while all<>""
                            if not (all parse any:(var Str f
                              first := all ; remain := ""
                            var ColorSpectrum32 n1 := color_
                            var ColorSpectrum32 d1 := color_
                            if n1=undefined or d1=undefined
                              s1 := cast (cast undefined Flo
                            n1 := max n1-(cast specular Colo
                            d1 := max d1-(cast specular Colo
                            s1 *= n1/d1
                            all := remain
                          s1 := (1-specular)*s1+(cast specul
                          var ColorXYZ wished1 := filter_XYZ
                          var ColorLCh lch1 := cast wished1 
                          text (string lch1:L "fixed 1") ; f
                        var ColorXYZ wished1 := filter_XYZ s1
                        var ColorLCh lch1 := cast wished1 ColorLCh
                        text (string lch1:L "fixed 1") ; fixed [ ] ; text (string lch1:C "fixed 1") ; fixed [ ] ; text (string lch1:h "fixed 0")
                      cell
                        if s1=defined
                          var ColorRGB888 rgb := cast filter
                          image "sample/r"+string:(cast rgb:
                      cell
                        if s0=defined and s1=defined
                      cell
                        if s1=defined
                          var ColorRGB888 rgb := cast filter
                          image "sample/r"+string:(cast rgb:
                      cell
                        if s0=defined and s1=defined
                          display_spectrum color_spectrum32:
                          display_spectrum color_spectrum32:sample/s0 s1 (var ColorSpectrum32 no_spectrum) 
                    else
                      cell
                        if s0=defined
                    else
                      cell
                        if s0=defined
                          display_spectrum color_spectrum32:
                          display_spectrum color_spectrum32:sample/s0 (var ColorSpectrum32 no_spectrum) (var ColorSpectrum32 no_spectrum)
                input "Color level: " (var Str l) noeol
                page button "Measure" noeol
                  var Str s
                  if (l parse any:(var Str l1) "=" any:(var 
                    l := l1
                    s := color_database:data:device:l2:chann
                  else
                    if not initialized
                      console "initializing spectrocolorimet
                      spectro_init
                      initialized := true
                    s := string spectro_spectrum
                  ch:sample create l
                  ch:sample l := s
                  reload_page
                button "Delete" noeol
                  ch:sample delete l
                  reload_page
                if s0=defined
                  para
                    input "Gamut: " (var Str gamut_name) len
                    page button "Formulate" noeol
                      title "Color formultation to '"+gamut_
                      var ColorSpectrum32 s0a := ch s0
                      var ColorSpectrum32 s100a := ch s100
                      var Link:ColorGamut gamut :> color_gam
                      table columns 7
                        cell header [Color]
                        cell header
                          [Thickness[lf]Surface[lf]]
                          [L*C*h] ; small [ ab]
                        cell header [Density]
                        cell header [Sample]
                        cell header [Formulation]
                        cell header
                          [L*C*h] ; small [ ab]
                        cell header [Proof color]
                        each sample ch:sample sort (right ke
                          cell
                            text keyof:sample
                          cell
                            if s100a=defined
                              var Float density := ink_thick
                              text (string density*100 "fixe
                              var Float density := ink_surfa
                              text (string density*100 "fixe
                            var ColorLCh lch2 := cast (filte
                            text (string lch2:L "fixed 1") ;
                          cell
                            if s100a=defined
                              var Float density := ink_densi
                              text (string density*100 "fixe
                          cell
                            var ColorRGB888 rgb2 := cast (fi
                            image "sample/r"+string:(cast rg
                          gamut formulate (filter_XYZ color_
                          gamut decode addressof:pixel (var 
                          var ColorXYZ final := gamut simula
                          cell
                            fixed
                              for (var Int dim) 0 gamut:dime
                                text (shunt dim=0 "" " ")+(r
                            eol
                            for (var Int dim) 0 gamut:dimens
                              text (shunt dim=0 "" " ")+(str
                          cell
                            var Float err := lab_distance (f
                            small { html "&Delta;E " ; text 
                            var Float err := cmc_distance (f
                            small (text "CMC "+(string err "
                            var ColorLCh lch2 := cast final 
                            text (string lch2:L "fixed 1") ;
                          cell
                            var ColorRGB888 rgb2 := cast fin
                            image "sample/r"+string:(cast rg
                if s0=defined and s100=defined
                  para
                    image "editor.html?"+(http_encode "devic
                    eol ; small [red is density, green is su
            cell
              text ch:options
        input "Channel ID: " (var Str cid) noeol
        button "Create new ink" noeol
          d:channel create cid
          reload_page
        button "Delete the ink"
          d:channel delete cid
          reload_page
        table columns 4
          cell header [Color]
          cell header [... is an alias of]
          cell header [Sample]
          cell header [Opacity]
          each a d:alias
            cell
              text keyof:a
            cell
              input "" a
            var Data:ColorChannel ch :> d:channel a
            var ColorSpectrum32 a_s0 := ch s0
            var ColorSpectrum32 a_s100 := ch s100
            if a_s0=defined and a_s100=defined
              cell color (cast (filter_XYZ a_s100/a_s0) Colo
                fixed [ ]
            else
              cell void
            cell
              if (ch:options option "opacity" Float)=defined
                text string:(ch:options option "opacity" Flo
        input "Alias ID: " (var Str aid) noeol
        button "Create new alias" noeol
          d:alias create aid
          reload_page
        button "Delete the alias"
          d:alias delete aid
          reload_page
        table columns 2
          cell header [Grid]
          cell header [Steps]
          each g d:grid
            cell
              text keyof:g
            cell
              input "" g length 2
        input "Grid: " (var Str gid) length 40 noeol
        button "Create new grid" noeol
          d:grid create gid
          d:grid gid := undefined
          reload_page
        button "Delete the grid"
          d:grid delete gid
          reload_page
        [A grid value could be 'process_cyan+process_magenta
     


                input "Color level: " (var Str l) noeol
                page button "Measure" noeol
                  var Str s
                  if (l parse any:(var Str l1) "=" any:(var 
                    l := l1
                    s := color_database:data:device:l2:chann
                  else
                    if not initialized
                      console "initializing spectrocolorimet
                      spectro_init
                      initialized := true
                    s := string spectro_spectrum
                  ch:sample create l
                  ch:sample l := s
                  reload_page
                button "Delete" noeol
                  ch:sample delete l
                  reload_page
                if s0=defined
                  para
                    input "Gamut: " (var Str gamut_name) len
                    page button "Formulate" noeol
                      title "Color formultation to '"+gamut_
                      var ColorSpectrum32 s0a := ch s0
                      var ColorSpectrum32 s100a := ch s100
                      var Link:ColorGamut gamut :> color_gam
                      table columns 7
                        cell header [Color]
                        cell header
                          [Thickness[lf]Surface[lf]]
                          [L*C*h] ; small [ ab]
                        cell header [Density]
                        cell header [Sample]
                        cell header [Formulation]
                        cell header
                          [L*C*h] ; small [ ab]
                        cell header [Proof color]
                        each sample ch:sample sort (right ke
                          cell
                            text keyof:sample
                          cell
                            if s100a=defined
                              var Float density := ink_thick
                              text (string density*100 "fixe
                              var Float density := ink_surfa
                              text (string density*100 "fixe
                            var ColorLCh lch2 := cast (filte
                            text (string lch2:L "fixed 1") ;
                          cell
                            if s100a=defined
                              var Float density := ink_densi
                              text (string density*100 "fixe
                          cell
                            var ColorRGB888 rgb2 := cast (fi
                            image "sample/r"+string:(cast rg
                          gamut formulate (filter_XYZ color_
                          gamut decode addressof:pixel (var 
                          var ColorXYZ final := gamut simula
                          cell
                            fixed
                              for (var Int dim) 0 gamut:dime
                                text (shunt dim=0 "" " ")+(r
                            eol
                            for (var Int dim) 0 gamut:dimens
                              text (shunt dim=0 "" " ")+(str
                          cell
                            var Float err := lab_distance (f
                            small { html "&Delta;E " ; text 
                            var Float err := cmc_distance (f
                            small (text "CMC "+(string err "
                            var ColorLCh lch2 := cast final 
                            text (string lch2:L "fixed 1") ;
                          cell
                            var ColorRGB888 rgb2 := cast fin
                            image "sample/r"+string:(cast rg
                if s0=defined and s100=defined
                  para
                    image "editor.html?"+(http_encode "devic
                    eol ; small [red is density, green is su
            cell
              text ch:options
        input "Channel ID: " (var Str cid) noeol
        button "Create new ink" noeol
          d:channel create cid
          reload_page
        button "Delete the ink"
          d:channel delete cid
          reload_page
        table columns 4
          cell header [Color]
          cell header [... is an alias of]
          cell header [Sample]
          cell header [Opacity]
          each a d:alias
            cell
              text keyof:a
            cell
              input "" a
            var Data:ColorChannel ch :> d:channel a
            var ColorSpectrum32 a_s0 := ch s0
            var ColorSpectrum32 a_s100 := ch s100
            if a_s0=defined and a_s100=defined
              cell color (cast (filter_XYZ a_s100/a_s0) Colo
                fixed [ ]
            else
              cell void
            cell
              if (ch:options option "opacity" Float)=defined
                text string:(ch:options option "opacity" Flo
        input "Alias ID: " (var Str aid) noeol
        button "Create new alias" noeol
          d:alias create aid
          reload_page
        button "Delete the alias"
          d:alias delete aid
          reload_page
        table columns 2
          cell header [Grid]
          cell header [Steps]
          each g d:grid
            cell
              text keyof:g
            cell
              input "" g length 2
        input "Grid: " (var Str gid) length 40 noeol
        button "Create new grid" noeol
          d:grid create gid
          d:grid gid := undefined
          reload_page
        button "Delete the grid"
          d:grid delete gid
          reload_page
        [A grid value could be 'process_cyan+process_magenta