Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gleam-community/colour
Colour types, conversions, and other utilities
https://github.com/gleam-community/colour
Last synced: 3 months ago
JSON representation
Colour types, conversions, and other utilities
- Host: GitHub
- URL: https://github.com/gleam-community/colour
- Owner: gleam-community
- License: apache-2.0
- Created: 2022-12-16T22:18:54.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-16T08:14:43.000Z (7 months ago)
- Last Synced: 2024-04-22T11:30:57.551Z (7 months ago)
- Language: Gleam
- Homepage:
- Size: 38.1 KB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
- awesome-gleam - gleam_community_colour - [📚](https://hexdocs.pm/gleam_community_colour/) - Colour types, conversions, and other utilities (Packages / Graphics)
README
# gleam-community/colour
A package for a standard Colour type, conversions, and other utilities.
[![Package Version](https://img.shields.io/hexpm/v/gleam_community_colour)](https://hex.pm/packages/gleam_community_colour)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/gleam_community_colour/)✨ This project is written in pure Gleam so you can use it anywhere Gleam runs: Erlang, Elixir, Node, Deno, and the browser!
---
## Quickstart
```gleam
import gleam_community/colour
import gleam_community/colour/accessibilitypub fn main() {
let foreground = colour.from_hsl(h: 0.858, s: 1.0, l: 0.843)let background_options = [colour.light_grey, colour.dark_grey]
let background = accessibility.maximum_contrast(foreground, background_options)
}
```## Installation
`gleam_community` packages are published to [hex.pm](https://hex.pm/packages/gleam_community_colour)
with the prefix `gleam_community_`. You can add them to your Gleam projects directly:```sh
gleam add gleam_community_colour
```The docs can be found over at [hexdocs.pm](https://hexdocs.pm/gleam_community_colour).