Giter VIP home page Giter VIP logo

Comments (6)

lukewestby avatar lukewestby commented on September 2, 2024

These functions should return a Color property with an rgba(r,g,b,a) value?

from elm-css.

rtfeldman avatar rtfeldman commented on September 2, 2024

It's actually that I changed Color to include red, green, and blue values, so you can now go (rgb 22, 23,224).red and get back 22. This lets people do color mixing and such.

This is where the function lives now: https://github.com/rtfeldman/elm-css/blob/master/src/Css.elm#L844-L854

Incidentally, here's the equivalent for hsl and hsla: https://github.com/rtfeldman/elm-css/blob/master/src/Css.elm#L860-L867

from elm-css.

lukewestby avatar lukewestby commented on September 2, 2024

got it! i can do this one tonight or tomorrow.

from elm-css.

rtfeldman avatar rtfeldman commented on September 2, 2024

Awesome! 😸

from elm-css.

rtfeldman avatar rtfeldman commented on September 2, 2024

Closing in favor of #76 cc @lukewestby - turns out having the records have a color : Color field (as in Color from core) will be more beneficial to people writing generic color mixing libraries, and I think it makes more sense to optimize for that use case than for the "pulling out red, green, or blue on an individual basis" use case.

from elm-css.

lukewestby avatar lukewestby commented on September 2, 2024

sweet! that's awesome 🤘

from elm-css.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.