All Projects → leodido → material-palette

leodido / material-palette

Licence: MIT License
Generates material palettes for your colors

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to material-palette

Material
A UI/UX framework for creating beautiful applications.
Stars: ✭ 11,870 (+62373.68%)
Mutual labels:  material, material-colors
Unity Shader Basics Tutorial
A introduction into creating shaders for Unity
Stars: ✭ 243 (+1178.95%)
Mutual labels:  material
Material Admin
Free Material Admin Template
Stars: ✭ 219 (+1052.63%)
Mutual labels:  material
Svelte Mui
Simple Svelte 3 UI components
Stars: ✭ 234 (+1131.58%)
Mutual labels:  material
Simplesearchview
A simple SearchView for Android based on Material Design
Stars: ✭ 222 (+1068.42%)
Mutual labels:  material
Motion Shapeofview
Explain how to use MotionLayout with ShapeOfView
Stars: ✭ 236 (+1142.11%)
Mutual labels:  material
Rplibs
Refs.cn 原型设计元件库,基于Axure RP 10/9/8,支持 Android、Apple、Windows、微信,移动、桌面平台的应用和网站原型设计。五年历程 2.6k+ star,感谢大家使用。
Stars: ✭ 2,622 (+13700%)
Mutual labels:  material
React Materialui Notifications
Spec compliant notifications for react and material ui users
Stars: ✭ 252 (+1226.32%)
Mutual labels:  material
Responsive scaffold
Responsive Scaffold - On mobile it shows a list and pushes to details and on tablet it shows the List and the selected item. Maintainer: @rodydavis
Stars: ✭ 238 (+1152.63%)
Mutual labels:  material
Hexo Theme Fluid
🌊 一款 Material Design 风格的 Hexo 主题 / An elegant Material-Design theme for Hexo
Stars: ✭ 3,700 (+19373.68%)
Mutual labels:  material
Android Icon Fonts
Material and Holo iconic fonts.
Stars: ✭ 229 (+1105.26%)
Mutual labels:  material
Angular Awesome List
Список ресурсов по Angular на русском
Stars: ✭ 224 (+1078.95%)
Mutual labels:  material
Dialogsheet
An Android library to create fully material designed bottom dialogs similar to the Android Pay app.
Stars: ✭ 236 (+1142.11%)
Mutual labels:  material
Material Backdrop
A simple solution for implementing Backdrop pattern for Android
Stars: ✭ 221 (+1063.16%)
Mutual labels:  material
Material Colors Native
Material Colors - A React Native App to Select Material Colors for macOS.
Stars: ✭ 246 (+1194.74%)
Mutual labels:  material
Aaf Easydiary
📘 A diary application optimized for user experience.
Stars: ✭ 216 (+1036.84%)
Mutual labels:  material
Shaarli Material
Shaarli Material is a theme for Shaarli, the famous personal, minimalist, super-fast, database free, bookmarking service.
Stars: ✭ 228 (+1100%)
Mutual labels:  material
Android Bookmark
【资料汇总】Android 资源知识大全 http://www.yundashi168.com/articles/2018/09/12/1536725366888.html
Stars: ✭ 235 (+1136.84%)
Mutual labels:  material
djadmin
Djadmin is a django admin theme
Stars: ✭ 42 (+121.05%)
Mutual labels:  material-colors
Redash Hands On
Redash study materials for beginners 📊
Stars: ✭ 247 (+1200%)
Mutual labels:  material


Material Palette Generator


CI NPM Coveralls branch

Generates material palettes for your colors

Given an input color it calculates its palette approaching the logic of Google Material Design Color Palettes.

Since the algorithm behind their generation is not (yet) known this module approximates the colors values.

It works everywhere: browsers, node, and so on.

Install

With npm do:

npm install material-palette

API

This module exports a single function, the material palette generator.

materialpalette({ h: number, s: number, l: number })

  • It takes an object containing the h, s, and l fields

    • The field h must be a numeric into [0, 360].

    • The fields s and l must be numerics into [0, 100].

  • It returns an object containing all the 14 palette variants (e.g., 50, 100, 200, ..., A700)

As always, more details reading the tests ...

Example

Suppose you want to generate a material palette for hsl(87, 100%, 22%) color (i.e. #3E7000).

First of all import the generator.

var materialpalette = require('materialpalette') // node
import materialpalette from 'materialpalette' // ES2015
window.materialpalette // browsers

Then use it.

var ciao = materialpalette({ h: 87, s: 100, l: 22 })

Which results in the following object ...

{
  '50': { h: 87, s: 100, l: 74 },
  '100': { h: 87, s: 100, l: 59 },
  '200': { h: 87, s: 100, l: 48 },
  '300': { h: 87, s: 100, l: 34 },
  '400': { h: 87, s: 100, l: 28 },
  '500': { h: 87, s: 100, l: 22 },
  '600': { h: 87, s: 100, l: 16 },
  '700': { h: 87, s: 100, l: 10 },
  '800': { h: 87, s: 100, l: 4 },
  '900': { h: 87, s: 100, l: 0 },
  'A100': { h: 92, s: 100, l: 46 },
  'A200': { h: 92, s: 100, l: 38 },
  'A400': { h: 92, s: 100, l: 21 },
  'A700': { h: 92, s: 100, l: 10 }
}

Matching, visually ...

Material Colors Palette for #3E7000

It's cool, isn't it?

License

MIT © Leonardo Di Donato


Analytics

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].