Tagged: color

  • Note - Posted on

    Just spent some time playing with OKpalette, a color extraction tool by David Aerne, and I’m in awe.

    The 3D spinning text pulled me in immediately. I assumed it was done using JavaScript because it reminded me of the Space Type Generator. Finding out it’s done using CSS genuinely blew my mind. David was kind enough to share a CodePen demo.

    I loved the animations and the subtle use of audio while interacting with the UI. Then I watched David’s walkthrough / demo and realized the functionality is just as beautiful as the visuals, if not more.

  • Note - Posted on

    Ana Tudor wrote on Mastodon:

    Stupid #CSS question because I’m losing my mind here: why isn’t calc(.5*a) working? What am I missing? It doesn’t seem to be working in any browser.

    Ana is trying to use calc(.5 * a) as a part of the relative color syntax, presumably to create semi transparent outlines. But it is not working because calc(.5 * a) is an invalid property value. As Valtteri Laitinen replied, it should actually be alpha in there instead of a.

    .class {
    	outline-color: rgb(from currentcolor r g b / calc(0.5 * a)); /* ❌ invalid */
    	outline-color: rgb(
    		from currentcolor r g b / calc(0.5 * alpha)
    	); /* ✅ valid */
    }