Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
natemwilson
on May 17, 2025
|
parent
|
context
|
favorite
| on:
How to have the browser pick a contrasting color i...
I’ve never seen any CSS function that has this call back style where you get parameters that you can modify. So interesting! Are there any other examples of this or is this unique to lch?
fireflies_
on May 17, 2025
|
next
[–]
This is "relative color" syntax, it works with a range of color spaces/color functions. The key is the "from" at the front. Here's the MDN documentation:
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_colors/...
halflife
on May 17, 2025
|
prev
|
next
[–]
It may be confusing, but everything here is static param. The —- prefix is css variables, where inside a css declaration block you write: —bg: blue
natemwilson
on May 18, 2025
|
parent
|
next
[–]
The `l` isn't!
KTibow
on May 17, 2025
|
prev
[–]
Some newer ones like calc-size are also like this.
Consider applying for YC's Fall 2026 batch!
Applications
are open till July 27.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: