|
184 | 184 | "rationale": ".algorithm", |
185 | 185 | "steps": [ |
186 | 186 | { |
187 | | - "html": "if <var>destination</var> has no gamut limits (XYZ-D65, XYZ-D50, Lab, LCH, Oklab, OKLCh) convert <var>origin</var> to <var>destination</var> and return it as the gamut mapped color" |
| 187 | + "html": "if <var>destination</var> has no gamut limits (XYZ-D65, XYZ-D50, Lab, LCH, Oklab, OkLCh) convert <var>origin</var> to <var>destination</var> and return it as the gamut mapped color" |
188 | 188 | }, |
189 | 189 | { |
190 | | - "html": "let <var>origin_OKLCh</var> be <var>origin</var> converted\n\t\tfrom <var>origin color space</var> to the OKLCh color space" |
| 190 | + "html": "let <var>origin_OkLCh</var> be <var>origin</var> converted\n\t\tfrom <var>origin color space</var> to the OkLCh color space" |
191 | 191 | }, |
192 | 192 | { |
193 | | - "html": "if the Lightness of <var>origin_OKLCh</var> is greater than or equal to 100%,\n\t\tconvert `oklab(1 0 0 / origin.alpha)` to <var>destination</var> and return it as the gamut mapped color" |
| 193 | + "html": "if the Lightness of <var>origin_OkLCh</var> is greater than or equal to 100%,\n\t\tconvert `oklab(1 0 0 / origin.alpha)` to <var>destination</var> and return it as the gamut mapped color" |
194 | 194 | }, |
195 | 195 | { |
196 | | - "html": "if the Lightness of <var>origin_OKLCh</var> is less than than or equal to 0%,\n\t\tconvert `oklab(0 0 0 / origin.alpha)` to <var>destination</var> and return it as the gamut mapped color" |
| 196 | + "html": "if the Lightness of <var>origin_OkLCh</var> is less than than or equal to 0%,\n\t\tconvert `oklab(0 0 0 / origin.alpha)` to <var>destination</var> and return it as the gamut mapped color" |
197 | 197 | }, |
198 | 198 | { |
199 | 199 | "html": "let inGamut(<var>color</var>) be a function which returns true if, when passed a color,\n\t\tthat color is inside the gamut of <var>destination</var>.\n\t\tFor HSL and HWB, it returns true if the color is inside the gamut of sRGB." |
200 | 200 | }, |
201 | 201 | { |
202 | | - "html": "if inGamut(<var>origin_OKLCh</var>) is true, convert <var>origin_OKLCh</var> to <var>destination</var> and return it as the gamut mapped color" |
| 202 | + "html": "if inGamut(<var>origin_OkLCh</var>) is true, convert <var>origin_OkLCh</var> to <var>destination</var> and return it as the gamut mapped color" |
203 | 203 | }, |
204 | 204 | { |
205 | 205 | "html": "otherwise, let delta(<var>one</var>, <var>two</var>) be a function which returns the deltaEOK of color <var>one</var> compared to color <var>two</var>" |
|
214 | 214 | "html": "let clip(<var>color</var>) be a function which converts <var>color</var> to <var>destination</var>,\n\t\tclamps each component to the bounds of the reference range for that component\n\t\tand returns the result" |
215 | 215 | }, |
216 | 216 | { |
217 | | - "html": "set <var>current</var> to <var>origin_OKLCh</var>" |
| 217 | + "html": "set <var>current</var> to <var>origin_OkLCh</var>" |
218 | 218 | }, |
219 | 219 | { |
220 | 220 | "html": "set <var>clipped</var> to clip(<var>current</var>)" |
|
235 | 235 | "html": "set <var>min</var> to zero" |
236 | 236 | }, |
237 | 237 | { |
238 | | - "html": "set <var>max</var> to the OKLCh chroma of <var>origin_OKLCh</var>" |
| 238 | + "html": "set <var>max</var> to the OkLCh chroma of <var>origin_OkLCh</var>" |
239 | 239 | }, |
240 | 240 | { |
241 | 241 | "html": "let <var>min_inGamut</var> be a boolean that represents when <var>min</var> is still in gamut, and set it to true" |
|
0 commit comments