Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Francis <francis@sugarlabs.org>2012-09-13 01:47:27 (GMT)
committer Daniel Francis <francis@sugarlabs.org>2012-09-13 01:47:27 (GMT)
commitcf9aac721f814db3abb67706e941c13ba28e5fcd (patch)
tree9cadc19039082000011d132aa4050dac9da8581a
parent2c11fc425ff13533843eec2c588ac718301501ac (diff)
Add docstrings in desktop colors module
-rw-r--r--desktop/sweetener/colors.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/desktop/sweetener/colors.py b/desktop/sweetener/colors.py
index 3b5d938..d825f4c 100644
--- a/desktop/sweetener/colors.py
+++ b/desktop/sweetener/colors.py
@@ -1,6 +1,6 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
+"""Color handling.
+Utilities for handle color data and conversions.
+"""
# Copyright (C) 2012 S. Daniel Francis <francis@sugarlabs.org>
#
# This program is free software; you can redistribute it and/or modify
@@ -23,6 +23,9 @@ logger = logging.getLogger('colors')
def color2string(color):
+ """Converts a GdkColor to a RGB string
+ color -- gtk.gdk.Color
+ """
color_string = ["#"]
color_string.append("%02x" % (color.red / 256))
color_string.append("%02x" % (color.green / 256))