Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
32c562bd
Kaydet (Commit)
32c562bd
authored
Nis 19, 1999
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
colorsys docs from David Ascher.
üst
9d158817
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
libcolorsys.tex
Doc/lib/libcolorsys.tex
+54
-0
No files found.
Doc/lib/libcolorsys.tex
0 → 100644
Dosyayı görüntüle @
32c562bd
\section
{
\module
{
colorsys
}
---
Conversions between color systems
}
\declaremodule
{
standard
}{
colorsys
}
\modulesynopsis
{
Conversion functions between RGB and other color systems.
}
\sectionauthor
{
David Ascher
}{
da@python.net
}
The
\module
{
colorsys
}
module defines bidirectional conversions of
color values between colors expressed in the RGB (Red Green Blue)
color space used in computer monitors and three other coordinate
systems: YIQ, HLS (Hue Lightness Saturation) and HSV (Hue Saturation
Value). Coordinates in all of these color spaces are floating point
values. In the YIQ space, the Y coordinate is between 0 and 1, but
the I and Q coordinates can be positive or negative. In all other
spaces, the coordinates are all between 0 and 1.
More information about color spaces can be found at
\url
{
http://www.inforamp.net/
\%
7epoynton/ColorFAQ.html
}
.
The
\module
{
colorsys
}
module defines the following functions:
\begin{funcdesc}
{
rgb
_
to
_
yiq
}{
r, g, b
}
Convert the color from RGB coordinates to YIQ coordinates.
\end{funcdesc}
\begin{funcdesc}
{
yiq
_
to
_
rgb
}{
y, i, q
}
Convert the color from YIQ coordinates to RGB coordinates.
\end{funcdesc}
\begin{funcdesc}
{
rgb
_
to
_
hls
}{
r, g, b
}
Convert the color from RGB coordinates to HLS coordinates.
\end{funcdesc}
\begin{funcdesc}
{
hls
_
to
_
rgb
}{
h, l, s
}
Convert the color from HLS coordinates to RGB coordinates.
\end{funcdesc}
\begin{funcdesc}
{
rgb
_
to
_
hsv
}{
r, g, b
}
Convert the color from RGB coordinates to HSV coordinates.
\end{funcdesc}
\begin{funcdesc}
{
hsv
_
to
_
rgb
}{
h, s, v
}
Convert the color from HSV coordinates to RGB coordinates.
\end{funcdesc}
Example:
\begin{verbatim}
>>> import colorsys
>>> colorsys.rgb
_
to
_
hsv(.3, .4, .2)
(0.25, 0.5, 0.4)
>>> colorsys.hsv
_
to
_
rgb(0.25, 0.5, 0.4)
(0.3, 0.4, 0.2)
\end{verbatim}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment