,
- bokeh.colores.Color
- bokeh.colores.HSL
- bokeh.colores.RGB
- bokeh.colores.grupos
- bokeh.colores.nombres
bokeh.colores.Color
Esta es la clase base que representa los objetos de color. Los métodos de esta clase son:
- abrazadera()
- Copiar()
- oscurecer()
- de_hsl()
- de_rgb()
- aligerar()
- to_css()
- to_hsl()
- to_rgb()
bokeh.colores.HSL
Python3
# importing the modules from bokeh.plotting import figure, output_file, show from bokeh.colors import HSL # file to save the model output_file("gfg.html") # instantiating the figure object graph = figure(title = "Bokeh Color") # the point to be plotted x = 0 y = 0 # HSL color hue = 0 saturation = 0.47 lightness = 0.58 color = HSL(h = hue, s = saturation, l = lightness) # plotting the graph graph.dot(x, y, size = 1000, color = color.to_rgb()) # displaying the model show(graph)
Producción :
bokeh.colores.RGB
representa
Python3
# importing the modules from bokeh.plotting import figure, output_file, show from bokeh.colors import RGB # file to save the model output_file("gfg.html") # instantiating the figure object graph = figure(title = "Bokeh Color") # the point to be plotted x = 0 y = 0 # RGB color red = 144 green = 238 blue = 144 color = RGB(r = red, g = green, b = blue) # plotting the graph graph.dot(x, y, size = 1000, color = color) # displaying the model show(graph)
bokeh.colores.grupos
Lo diferente
- negro: gainsboro, gris claro, plata, gris oscuro, gris, gris oscuro, gris pizarra claro, gris pizarra, gris pizarra oscuro, negro
- azul: azul claro, azul pálido, azul claro, azul cielo, azul cielo claro, azul cielo profundo, azul dodger, azul aciano, azul acero, azul real, azul, azul medio, azul oscuro, azul marino, azul medianoche
- marrón: cornsilk, blanchedalmond, bisque, navajowhite, wheat, burlywood, tan, rosybrown, sandybrown, goldenrod, darkgoldenrod, peru, chocolate, Saddlebrown, sienna, brown, granate
- cian: aguamarina medio, aguamarina, cian, cian claro, turquesa pálido, aguamarina, turquesa, turquesa medio, turquesa oscuro, verde mar claro, azul cadete, cian oscuro, verde azulado
- verde: verde oliva oscuro, verde oliva, verde oliva, verde amarillo, verde lima, lima, verde césped, chartreuse, verde amarillo, verde primavera, verde primavera medio, verde claro, verde pálido, verde mar oscuro, verde mar medio, verde mar, verde bosque, verde, verde oscuro
- naranja: rojo anaranjado , tomate, coral, naranja oscuro, naranja
- rosa: rosa, rosa claro, rosa fuerte, rosa intenso, rojo violeta pálido, rojo violeta medio
- púrpura: lavanda, cardo, ciruela, violeta, orquídea, fucsia, magenta, orquídea mediana, púrpura mediana, violeta azulado, violeta oscuro, orquídea oscura, magenta oscuro, púrpura, índigo, azul pizarra oscuro, azul pizarra, azul pizarra mediano
- rojo: salmón claro, salmón, salmón oscuro, coral claro, rojo indio, carmesí, ladrillo refractario, rojo oscuro, rojo
- blanco: blanco, nieve, melaza, crema de menta, azur, aliceblue, blanco fantasma, humo blanco, concha, beige, encaje antiguo, blanco floral, marfil, blanco antiguo, lino, rubor lavanda, rosa brumosa
- amarillo: amarillo, amarillo claro, lemonchiffon, lightgoldenrodyellow, papayawhip, moccasin, peachpuff, palegoldenrod, khaki, darkkhaki, gold
Python3
# importing the modules from bokeh.plotting import figure, output_file, show from bokeh.colors.groups import purple, yellow, blue # file to save the model output_file("gfg.html") # instantiating the figure object graph = figure(title = "Bokeh Color") # the point to be plotted x = [-2, 0, 2] y = 0 # color groups color = [purple()._colors[purple()._colors.index("Fuchsia")], yellow()._colors[yellow()._colors.index("Khaki")], blue()._colors[blue()._colors.index("RoyalBlue")]] # plotting the graph graph.dot(x, y, size = 1000, color = color) # displaying the model show(graph)
bokeh.colors.named
Esta clase nos proporciona todos los
Python3
# importing the modules from bokeh.plotting import figure, output_file, show from bokeh.colors import named # file to save the model output_file("gfg.html") # instantiating the figure object graph = figure(title = "Bokeh Color") # the point to be plotted x = [-3, 0, 3] y = 0 # color names color = ["bisque", "greenyellow", "magenta"] # plotting the graph graph.dot(x, y, size = 1000, color = color) # displaying the model show(graph)