Tint

Build Status Coverage Status Hex.pm

Elixir library to convert colors between different colorspaces.

Prerequisites

  • Erlang 20 or greater
  • Elixir 1.8 or greater

Installation

If available in Hex, the package can be installed by adding tint to your list of dependencies in mix.exs:

def deps do
  [
    {:tint, "~> 0.2"}
  ]
end

Usage

red = Tint.RGB.new(255, 0, 0)
yellow = Tint.RGB.from_hex!("#FFCC00")
hsv = Tint.to_hsv(yellow)
Tint.RGB.to_hex(yellow)

Conversions

Following are conversions that are currently possible with this library.

  • Hex Triplet -> RGB
  • RGB -> Hex Triplet
  • RGB -> HSV
  • HSV -> RGB

Docs

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/tint.