Skip to content

Commit

Permalink
Docstring/comment fixes [skip ci] ref python-pillow#534
Browse files Browse the repository at this point in the history
  • Loading branch information
wiredfool committed Mar 17, 2014
1 parent 1c4dc75 commit 45ce1e0
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions PIL/ImageColor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@
from PIL import Image
import re


##
# Convert color string to RGB tuple.
#
# @param color A CSS3-style colour string.
# @return An RGB-tuple.
# @exception ValueError If the color string could not be interpreted
# as an RGB value.

def getrgb(color):
"""
Convert a color string to an RGB tuple. If the string cannot be parsed,
Expand All @@ -37,7 +28,7 @@ def getrgb(color):
.. versionadded:: 1.1.4
:param color: A color string
:return: ``(red, green, blue)``
:return: ``(red, green, blue[, alpha])``
"""
try:
rgb = colormap[color]
Expand Down Expand Up @@ -114,7 +105,7 @@ def getcolor(color, mode):
.. versionadded:: 1.1.4
:param color: A color string
:return: ``(red, green, blue)``
:return: ``(graylevel [, alpha]) or (red, green, blue[, alpha])``
"""
# same as getrgb, but converts the result to the given mode
color, alpha = getrgb(color), 255
Expand Down

0 comments on commit 45ce1e0

Please sign in to comment.