/// tab | Tab 1
//// tab | Tab A content ////
//// tab | Tab B content //// ///
/// tab | Tab 1
//// tab | Tab A content ////
//// tab | Tab B content //// ///
DPS Contrast, also known as Delta Phi Star, is a simple formula for predicting human visual perception of contrast between text and background.
WHAT WHERE HOW
UNIFORMITY:
DPS Contrast is quasi-uniform for human perception of text against a background on a self-illuminated display
| # pragma: init | |
| """Custom sRGB color class.""" | |
| from coloraide import Color as Base | |
| from coloraide.spaces.srgb.css import sRGB | |
| from coloraide.css import serialize | |
| from coloraide import algebra as alg | |
| import re | |
| RE_CUSTOM = re.compile(r'(?i)\b([a-z][a-z_]{2,})\b') |
"""XYB color space."""
from __future__ import annotations
from coloraide import algebra as alg
from coloraide.spaces import Space
from coloraide.types import Vector
from coloraide.cat import WHITES
from coloraide.channels import Channel, FLG_MIRROR_PERCENT
from coloraide import Color as Base| {"data":[{"facecolor":["rgb(111, 243, 0)","rgb(118, 243, 0)","rgb(117, 241, 0)","rgb(110, 241, 0)","rgb(112, 246, 0)","rgb(113, 249, 0)","rgb(113, 249, 0)","rgb(122, 251, 0)","rgb(255, 221, 129)","rgb(255, 224, 127)","rgb(108, 238, 0)","rgb(108, 238, 0)","rgb(114, 236, 0)","rgb(108, 238, 0)","rgb(114, 236, 0)","rgb(106, 233, 0)","rgb(100, 73, 0)","rgb(100, 76, 0)","rgb(195, 142, 0)","rgb(195, 148, 0)","rgb(197, 149, 0)","rgb(195, 142, 0)","rgb(197, 149, 0)","rgb(200, 145, 0)","rgb(255, 221, 186)","rgb(255, 222, 183)","rgb(255, 255, 255)","rgb(255, 254, 252)","rgb(161, 49, 0)","rgb(159, 48, 0)","rgb(144, 48, 0)","rgb(141, 47, 0)","rgb(146, 53, 0)","rgb(144, 48, 0)","rgb(5, 2, 0)","rgb(5, 2, 0)","rgb(255, 227, 209)","rgb(255, 224, 206)","rgb(255, 255, 255)","rgb(255, 254, 252)","rgb(255, 231, 140)","rgb(255, 231, 140)","rgb(255, 221, 132)","rgb(255, 221, 132)","rgb(255, 221, 132)","rgb(255, 225, 132)","rgb(255, 228, 155)","rgb(255, 227, 152)","rgb(255, 226, 135)","rgb(255, 226, 137)","rgb(255, 251, 247)","rgb(2 |
| # pragma: init | |
| """ | |
| Okhsl/Okhsv class. | |
| Adapted to Python and ColorAide and adjusted to P3 by Isaac Muse 2023. | |
| ---- License ---- | |
| Copyright (c) 2021 Björn Ottosson |
| # pragma: init | |
| from coloraide import Color as Base | |
| from coloraide.cat import WHITES | |
| from coloraide.spaces import Space | |
| from coloraide import algebra as alg | |
| from coloraide.types import Vector | |
| from coloraide.channels import Channel | |
| from coloraide import Color as Base | |
| # pragma: init | |
| """Convert Linear sRGB to LMS using Smith & Pokorny (1975) 2-deg cone fundamentals.""" | |
| from __future__ import annotations | |
| from coloraide.cat import WHITES | |
| from coloraide.spaces import Space | |
| from coloraide import algebra as alg | |
| from coloraide.types import Vector | |
| from coloraide.channels import Channel | |
| LRGB_TO_LMS = [ |
| """ | |
| Execute Python code in code blocks and construct a interactive Python console output. | |
| This allows you to write code examples, but then execute them, showing the results. | |
| https://github.com/facelessuser/pymdown-extensions/issues/1690 | |
| --- | |
| MIT License |
IMPORTANT: please see the APCA integration compliance doc.
Files in this repository are licensed to the W3/AGWG under their cooperative agreement for use with WCAG accessibility guidelines for web-delivered and web-based content only, and not for any other use. Certain limitations do apply.
Use of the terms "SAPC", "SACAM", "APCA", "Advanced Perceptual Contrast Algorithm", "Accessible Perceptual Contrast Algorithm", to describe any contrast method, app, or device, is only permitted for code that is correctly implemented, maintained, and up to date, per the APCA integration compliance page.
Code or implementations found to be non-compliant with APCA, meaning they are incorrect in operation or methodology as defined for APCA contrast, including but not limited to the indication of polarity, and use