bokeh.colors#
提供用于表示RGB(A)和HSL(A)颜色的类,以及定义常见的命名颜色。
bokeh.colors.Color#
提供一个基类来表示颜色值。
- class Color[source]#
表示颜色对象的基类。
- darken(amount: float) Self[source]#
使此颜色变暗(降低亮度)。
子类必须实现此方法。
- Parameters:
amount (float) – 减少亮度的量(限制在零以上)
- Returns:
颜色
- abstract classmethod from_hsl(value: HSL) Self[source]#
通过从HSL颜色转换创建一个新颜色。
子类必须实现此方法。
- Parameters:
value (HSL) – 从HSL转换的颜色
- Returns:
颜色
- abstract classmethod from_rgb(value: RGB) Self[来源]#
通过从RGB颜色转换创建一个新颜色。
子类必须实现此方法。
- Parameters:
value (
RGB) – 从RGB转换的颜色- Returns:
颜色
- lighten(amount: float) Self[源代码]#
减轻(增加亮度)此颜色。
子类必须实现此方法。
- Parameters:
amount (float) – 增加亮度的量(限制在零以上)
- Returns:
颜色
- to_serializable(serializer: Serializer) Any[source]#
将此对象转换为可序列化的表示形式。
bokeh.colors.groups#
根据一般色调将CSS命名颜色组织成有用的组。
- class black[source]#
CSS “黑色”颜色组,由https://www.w3schools.com/colors/colors_groups.asp定义
gainsborolightgraysilverdarkgraygraydimgraylightslategrayslategraydarkslategrayblack
- class blue[源代码]#
CSS “蓝色” 颜色组,由 https://www.w3schools.com/colors/colors_groups.asp 定义
lightsteelbluepowderbluelightblueskybluelightskybluedeepskybluedodgerbluecornflowerbluesteelblueroyalbluebluemediumbluedarkbluenavymidnightblue
- class brown[source]#
CSS “棕色”颜色组,由https://www.w3schools.com/colors/colors_groups.asp定义
cornsilkblanchedalmondbisquenavajowhitewheatburlywoodtanrosybrownsandybrowngoldenroddarkgoldenrodperuchocolatesaddlebrownsiennabrownmaroon
- class cyan[source]#
CSS “青色”颜色组,由https://www.w3schools.com/colors/colors_groups.asp定义
mediumaquamarineaquacyanlightcyanpaleturquoiseaquamarineturquoisemediumturquoisedarkturquoiselightseagreencadetbluedarkcyanteal
- class green[source]#
CSS “绿色”颜色组,由https://www.w3schools.com/colors/colors_groups.asp定义
darkolivegreenoliveolivedrabyellowgreenlimegreenlimelawngreenchartreusegreenyellowspringgreenmediumspringgreenlightgreenpalegreendarkseagreenmediumseagreenseagreenforestgreengreendarkgreen
- class orange[source]#
CSS “橙色” 颜色组,由 https://www.w3schools.com/colors/colors_groups.asp 定义
orangeredtomatocoraldarkorangeorange
- class pink[source]#
CSS “粉红色”颜色组,由https://www.w3schools.com/colors/colors_groups.asp定义
pinklightpinkhotpinkdeeppinkpalevioletredmediumvioletred
- class purple[source]#
CSS “紫色”颜色组,由https://www.w3schools.com/colors/colors_groups.asp定义
lavenderthistleplumvioletorchidfuchsiamagentamediumorchidmediumpurplebluevioletdarkvioletdarkorchiddarkmagentapurpleindigodarkslateblueslatebluemediumslateblue
- class red[source]#
CSS “红色”颜色组,由https://www.w3schools.com/colors/colors_groups.asp定义
lightsalmonsalmondarksalmonlightcoralindianredcrimsonfirebrickdarkredred
- class white[source]#
CSS “白色”颜色组,由https://www.w3schools.com/colors/colors_groups.asp定义
whitesnowhoneydewmintcreamazurealiceblueghostwhitewhitesmokeseashellbeigeoldlacefloralwhiteivoryantiquewhitelinenlavenderblushmistyrose
- class yellow[source]#
CSS “黄色”颜色组,由https://www.w3schools.com/colors/colors_groups.asp定义
yellowlightyellowlemonchiffonlightgoldenrodyellowpapayawhipmoccasinpeachpuffpalegoldenrodkhakidarkkhakigold
bokeh.colors.named#
提供标准的147种CSS(X11)命名颜色。