Imageprogramming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Imagecodeinabox to ImageCSSEnglish · 2 months ago

Interpolate contrast-color() to manipulate lightness

daverupert.com

external-link
message-square
0
link
fedilink
1
external-link

Interpolate contrast-color() to manipulate lightness

daverupert.com

Imagecodeinabox to ImageCSSEnglish · 2 months ago
message-square
0
link
fedilink
In my first post on contrast-color() I demo’d using color-mix() to change a background-color on hover, but I will be honest… mixing black and white isn’t always what you want. It would be cool and helpful to coerce contrast-color() to return either 1 or -1 so that we could adjust lightness in a color function on hover instead of only mixing white and black.
alert-triangle
You must log in or # to comment.

ImageImage
CSS

css

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 31 users / week
  • 112 users / month
  • 231 users / 6 months
  • 231 local subscribers
  • 722 subscribers
  • 172 Posts
  • 135 Comments
  • Modlog
  • mods:
  • ImageAtegon
  • BE: 0.19.13
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org
Advertisement