Skip to content

Commit 71ca13b

Browse files
committed
[css-color-5] more generalization on color interpolation
1 parent a6d0733 commit 71ca13b

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

css-color-5/Overview.bs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ but different to the HSL Lightness.
156156

157157
Only the [=color-adjuster=]s defined for a given [=colorspace=] are available.
158158
For example, it is not possible to use the HWB [=whiteness=] adjuster unless the colorspace is [=hwb=].
159-
The alpha adjuster is available on any color space.
159+
The alpha adjuster is available on any [=colorspace=].
160160

161161
If the specified colorspace has a smaller gamut
162162
than the one in which the color to be adjusted is specified,
@@ -587,7 +587,7 @@ Adjusting colors: the ''color-adjust'' function {#coloradjust}
587587
Relative color syntax {#relative-colors}
588588
--------------------------------------------------------
589589

590-
Besides specifying absolute coordinates, all color functions can also be used with a *relative syntax* to produce colors in the function's target color space, based on an existing color (henceforth referred to as "origin color"). This syntax consists of the keyword ''from'', a <<color>> value, and optionally numerical coordinates specific to the color function. To allow calculations on the original color's coordinates, there are single-letter keywords for each coordinate and `alpha` that corresponds to the color's alpha. If no coordinates are specified, the function merely converts the origin color to the target function's color space.
590+
Besides specifying absolute coordinates, all color functions can also be used with a *relative syntax* to produce colors in the function's target [=colorspace=], based on an existing color (henceforth referred to as "origin color"). This syntax consists of the keyword ''from'', a <<color>> value, and optionally numerical coordinates specific to the color function. To allow calculations on the original color's coordinates, there are single-letter keywords for each coordinate and `alpha` that corresponds to the color's alpha. If no coordinates are specified, the function merely converts the origin color to the target function's [=colorspace=].
591591

592592
The following sections outline the relative color syntax for each color function.
593593

@@ -747,7 +747,18 @@ When an origin color is present, the following keywords can also be used in this
747747
Interpolation {#interpolation}
748748
===================================
749749

750-
In general, interpolation between <<color>> values of the same color space occurs by linearly interpolating each component of the computed value of the color separately, in that colorspace.
750+
Color interpolation happens with
751+
gradients,
752+
compositing,
753+
filters,
754+
transitions,
755+
animations, and
756+
color mixing and color modification functions.
757+
758+
In general, interpolation between <<color>> values of the same [=colorspace=]
759+
occurs by linearly interpolating each component of the computed value of the color
760+
separately, in that colorspace.
761+
This provides Web compatibility; legacy sRGB content interpolates in the sRGB space by default.
751762

752763
Issue: Should gamut mapping occur before or after interpolation?
753764

0 commit comments

Comments
 (0)