Skip to main content
Ctrl+K
Matplotlib 3.10.0.dev759+ge90952ffac 文档 - Home
  • Plot types
  • User guide
  • Tutorials
  • Examples
  • Reference
  • Contribute
  • Releases
  • Gitter
  • Discourse
  • GitHub
  • Twitter
  • Plot types
  • User guide
  • Tutorials
  • Examples
  • Reference
  • Contribute
  • Releases
  • Gitter
  • Discourse
  • GitHub
  • Twitter

Section Navigation

  • matplotlib
  • matplotlib.afm
  • matplotlib.animation
  • matplotlib.artist
  • matplotlib.axes
  • matplotlib.axis
  • matplotlib.backend_bases
  • matplotlib.backend_managers
  • matplotlib.backend_tools
  • matplotlib.backends
  • matplotlib.bezier
  • matplotlib.category
  • matplotlib.cbook
  • matplotlib.cm
  • matplotlib.collections
  • matplotlib.colorbar
  • matplotlib.colors
    • matplotlib.colors.Normalize
    • matplotlib.colors.NoNorm
    • matplotlib.colors.AsinhNorm
    • matplotlib.colors.BoundaryNorm
    • matplotlib.colors.CenteredNorm
    • matplotlib.colors.FuncNorm
    • matplotlib.colors.LogNorm
    • matplotlib.colors.PowerNorm
    • matplotlib.colors.SymLogNorm
    • matplotlib.colors.TwoSlopeNorm
    • matplotlib.colors.Colormap
    • matplotlib.colors.LinearSegmentedColormap
    • matplotlib.colors.ListedColormap
    • matplotlib.colors.ColorSequenceRegistry
    • matplotlib.colors.LightSource
    • matplotlib.colors.from_levels_and_colors
    • matplotlib.colors.hsv_to_rgb
    • matplotlib.colors.rgb_to_hsv
    • matplotlib.colors.to_hex
    • matplotlib.colors.to_rgb
    • matplotlib.colors.to_rgba
    • matplotlib.colors.to_rgba_array
    • matplotlib.colors.is_color_like
    • matplotlib.colors.same_color
    • matplotlib.colors.获取命名颜色映射
    • matplotlib.colors.make_norm_from_scale
  • matplotlib.container
  • matplotlib.contour
  • matplotlib.dates
  • matplotlib.docstring
  • matplotlib.dviread
  • matplotlib.figure
  • matplotlib.font_manager
  • matplotlib.ft2font
  • matplotlib.gridspec
  • matplotlib.hatch
  • matplotlib.image
  • matplotlib.layout_engine
  • matplotlib.legend
  • matplotlib.legend_handler
  • matplotlib.lines
  • matplotlib.markers
  • matplotlib.mathtext
  • matplotlib.mlab
  • matplotlib.offsetbox
  • matplotlib.patches
  • matplotlib.path
  • matplotlib.patheffects
  • matplotlib.pyplot
  • matplotlib.projections
  • matplotlib.quiver
  • matplotlib.rcsetup
  • matplotlib.sankey
  • matplotlib.scale
  • matplotlib.sphinxext.mathmpl
  • matplotlib.sphinxext.plot_directive
  • matplotlib.sphinxext.figmpl_directive
  • matplotlib.sphinxext.roles
  • matplotlib.spines
  • matplotlib.style
  • matplotlib.table
  • matplotlib.testing
  • matplotlib.text
  • matplotlib.texmanager
  • matplotlib.ticker
  • matplotlib.tight_bbox
  • matplotlib.tight_layout
  • matplotlib.transforms
  • matplotlib.tri
  • matplotlib.type1font
  • matplotlib.typing
  • matplotlib.units
  • matplotlib.widgets
  • matplotlib._api
  • matplotlib._enums
  • mpl_toolkits.mplot3d
  • mpl_toolkits.axes_grid1
  • mpl_toolkits.axisartist
  • pylab
  • API 参考
  • matplotlib.colors
  • matplotlib.c...

matplotlib.colors.to_rgb#

matplotlib.colors.to_rgb(c)[源代码][源代码]#

将 c 转换为 RGB 颜色,静默丢弃 alpha 通道。

使用 matplotlib.colors.to_rgb 的示例#

命名颜色列表

List of named colors

样式表引用

Style sheets reference

Ribbon box

Ribbon box
On this page
  • to_rgb()
  • 使用 matplotlib.colors.to_rgb 的示例

© Copyright 2002–2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012–2024 The Matplotlib development team.

由 Sphinx 8.0.2创建。

Built from v3.9.2-622-gb01462c9ac-dirty.

Built with the PyData Sphinx Theme 0.15.4.