Lea Verou on Nostr: #CSSTip: Create variations of a color before Relative Color Syntax is implemented, ...
#CSSTip: Create variations of a color before Relative Color Syntax is implemented, with color-mix() and the `none` keyword:
https://codepen.io/leaverou/pen/gOZZQZb?editors=1100There I only vary (oklch) lightness, but you can do the same thing for any component of any color function — or even alpha.
Published at
2023-10-09 02:18:06Event JSON
{
"id": "f2f51291554fda66e7dd4726bcc601bda4ae675a13aa596e193998e5ada8aa1f",
"pubkey": "deb27057e60b8d796302849309a7c542aa1c718108be4813086deaf9139dff76",
"created_at": 1696817886,
"kind": 1,
"tags": [
[
"t",
"csstip"
],
[
"proxy",
"https://front-end.social/users/leaverou/statuses/111202656983748838",
"activitypub"
]
],
"content": "#CSSTip: Create variations of a color before Relative Color Syntax is implemented, with color-mix() and the `none` keyword: \nhttps://codepen.io/leaverou/pen/gOZZQZb?editors=1100\n\nThere I only vary (oklch) lightness, but you can do the same thing for any component of any color function — or even alpha.\n\nhttps://cdn.masto.host/frontendsocial/media_attachments/files/111/202/654/517/119/269/original/e123c12b9aba0865.png",
"sig": "6e346ea3d3fc6f732d902069bc74a3742bde185b0674ee1a5b0d0153448a7581a9a913f6892ee22c93408cecb275465a88bfbf8065d7e78b75d77acd1a4b7f65"
}