Coder Social home page Coder Social logo

cicc_colors's Introduction

CICC Colors

Library of color palettes for CICC WM slides, reports and tables. CICC调色板可以用于在使用Python生成图表或报告时,能够匹配CICC的颜色模板。

Install

pip install cicc_colors

How to Use

  1. 直接使用模板颜色,颜色使用 ppt_x_y 来标记, x, y 是CICC PPT模板中色版的位置。
from cicc_colors import colors
colors.ppt_1_1
>>> Color(203,170,123,255)
colors.ppt_1_1.hex()
>>> 'CBAA7B'
colors.ppt_1_1.rgb()
>>> (203,170,123)
colors.ppt_1_1.normal_rgb()
>>> (0.796078431372549, 0.6666666666666666, 0.4823529411764706)
  1. 自定义颜色,使用 r,g,b 来定义颜色后使用
from cicc_colors import colors
user_color = colors.Color(115,30,0)
>>> Color(115,30,0)
user_color.hex()
>>> '731E00'
user_color.hex(with_hex = True)
>>> '#731E00'
user_color.rgb()
>>> (115, 30, 0)
user_color.normal_rgb()
>>> (0.45098039215686275, 0.11764705882352941, 0.0)
  1. rgb 转 hex
from cicc_colors import colors
colors.RGB2Hex(203,170,123)
>>> '#CBAA7B'
  1. hex 转 rgb
from cicc_colors import colors
colors.Hex2RGB('#FF0FF0')
>>> (255, 15, 240)

How to Contribute

cicc_colors's People

Contributors

nyuspc avatar

Stargazers

 avatar

Watchers

James Cloos 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.