Compare a Screen Color and a Responsive CSS Swatch
Admin ·
Check a color in two different contexts. The display examples alter the same composited sRGB color using illustrative transforms. Responsive CSS uses your chosen declarations when a viewport or media preference matches.
Compare the same orange through five display models
Reset defaults and confirm that Light base color is #FF4500. Select E-Ink in the Display filter. You should see the orange sample beside #777777.
The orange input has encoded brightness about 117 of 255 using the BT.601 RGB weighting. Rounding to one of sixteen equal gray levels produces 119 in each channel. This is one illustration of monochrome output, and individual panels or lighting can differ.
ITU-R BT.601 studio encoding recommendationCSS Color 4 sRGB colors and alpha
Compare the native rules by theme and sample width
Keep the default mobile maximum of 639 px and desktop minimum of 900 px. Try a Light preview at 320 px, then use Try base and Try desktop. The preview browser applies the media rules inside the sample viewport.
Switch to Dark and repeat the comparison. The dark rules follow the light rules in the stylesheet. The more specific dark mobile or desktop query sets the final value when its width matches.
| Preview | Light value | Dark value |
|---|---|---|
| Mobile | #337980 | #E093A8 |
| Base | #FF4500 | #E2AD5E |
| Desktop | #2C5379 | #83BFAC |
CSS Media Queries Level 5 width and color schemeCSS Custom Properties Level 1
Check the same rule over a destination background
To test alpha, set Light base color to rgba(255, 0, 0, .5) and keep the white display canvas. The composited display input rounds to #FF8080.
Download the CSS, apply responsive-swatch to an element, then test the base width and scheme in developer tools. CSS preserves the original alpha, so choose an opaque canvas that reflects the destination when you check the display examples.
CSS Color 4 sRGB colors and alphaCSS Media Queries Level 5 width and color schemeCSS Custom Properties Level 1
Common questions
Does plugging in another monitor automatically change the preview model?
Choose the model manually. The illustrations apply stated transforms to the supplied sRGB color and do not identify or measure a connected display.
Which color goes into the CSS when an override is empty?
An empty override is omitted. Earlier rules that still match the viewport and theme supply the color.