Giter Club home page Giter Club logo

elm-color's Introduction

Build Status

elm-color

The this package defines a standard Color type (taking the place of elm-lang/core#Color in Elm 0.18) with the hope that all Elm packages that produce colors and all Elm packages that consume colors will use this type to allow all such packages to easily interoperate for the ultimate benefit of all Elm developers. (If you are a package author and find that the Color type here does not meet your package's needs for passing colors to or from your package, please report an issue so we can improve this package to support your needs.)

Future versions of this package will include additional common conversions and color manipulation functions. If you have used other color packages or written your own color-related functions in the past, please create an issue to describe your use case so we can better design additions to this package.

Example

import Color exposing (Color)
import Html exposing (Html)
import Html.Attributes exposing (style)

view : Color -> Html msg
view foreground =
    let
        hue =
            (Color.toHsla foreground).hue

        borderColor =
            Color.hsla hue 0.75 0.5 0.8
    in
    Html.div
        [ style "background-color" (Color.toCssString Color.lightOrange)
        , style "color" (Color.toCssString foreground)
        , style "border-color" (Color.toCssString borderColor)
        ]
        [ Html.text "(ᵔᴥᵔ)" ]

Built-in colors

This package also provides an "aesthetically reasonable" set of common colors.

Roadmap

  • Initial release: defines color type and basic conversion functions
  • 1.1.0: implement common color manipulation functions

elm-color's People

Contributors

2mol avatar avh4 avatar

Watchers

 avatar  avatar

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.