Giter VIP home page Giter VIP logo

matlab-material-colors's Introduction

matlab-material-colors

This library provides access to the Material UI Color Palette with a simple API, as well as a general Color object.

Examples

The color constructor accepts a variable numbers of arguments, supporting a couple different formats:

  • A single string argument representing a hex number of 3 or 4 colors. E.g.: '#FFA425', 'fF8bC2', '#81FD9155'. Note that the hash is optional.
  • A single vector of length 3 or 4, representing rgb or rgba colors, respectively. The range of the values is [0, 255].
  • Three floats representing RGB, respectively, in the range [0, 255]
  • Four floats representing RGBA, respectively, in the range [0, 255]
>> Color(255, 150, 150)

ans =

  Color with properties:

    r: 255
    g: 150
    b: 150
    a: 255
>> Color(255, 150, 150, 100)

ans =

  Color with properties:

    r: 255
    g: 150
    b: 150
    a: 100
>> Color('#FFa24d98')

ans =

  Color with properties:

    r: 255
    g: 162
    b: 77
    a: 152

The following color formats are supported by the Color class:

  • rgb(a)
  • cmyk
  • hsl(a)
  • hsv(a)
>> Color(255, 150, 150, 100).rgb()

ans =

    1.0000    0.5882    0.5882
>> Color(255, 150, 150, 100).rgba()

ans =

    1.0000    0.5882    0.5882    0.3922
>> Color(255, 150, 150, 100).cmyk()

ans =

         0    0.4118    0.4118         0
>> Color(255, 150, 150, 100).hsl()

ans =

         0    1.0000    0.7941
>> Color(255, 150, 150, 100).hsla()

ans =

         0    1.0000    0.7941    0.3922
>> Color(255, 150, 150, 100).hsv()

ans =

         0    0.4118    1.0000
>> Color(255, 150, 150, 100).hsva()

ans =

         0    0.4118    1.0000    0.3922

Material Colors examples

>> MaterialColors.red(400)

ans =

  Color with properties:

    r: 239
    g: 83
    b: 80
    a: 255

Colors:

  • red
  • pink
  • purple
  • deepPurple
  • indigo
  • blue
  • lightBlue
  • cyan
  • teal
  • green
  • lightGreen
  • lime
  • yellow
  • amber
  • orange
  • deepOrange
  • brown
  • gray (or grey)
  • blueGray (or blueGrey)

Variants:

  • 50
  • 100
  • 200
  • 300
  • 400
  • 500
  • 600
  • 700
  • 800
  • 900

matlab-material-colors's People

Contributors

mattco98 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.