# kdeui Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# KColor Class Reference

A color class that preserves both RGB and HSV values. More...

`#include <kcolordialog.h>`

Inheritance diagram for KColor:

[legend]
Collaboration diagram for KColor:

[legend]
List of all members.

## Public Member Functions

| KColor (const KColor &col)
| KColor (const QColor &col)
KColor & | operator= (const KColor &col)
bool | operator== (const KColor &col) const
void | setHsv (int _h, int _s, int _v)
void | setRgb (int _r, int _g, int _b)
void | rgb (int *_r, int *_g, int *_b) const
void | hsv (int *_h, int *_s, int *_v) const

## Protected Attributes

int | h
int | s
int | v
int | r
int | g
int | b

## Detailed Description

A color class that preserves both RGB and HSV values.

This is unlike QColor which only preserves RGB values and recalculates HSV values. The QColor behavior leads to an accumulation of rounding errors when working in the HSV color space.

Author:
  Waldo Bastian <bastian@kde.org>

Definition at line 164 of file kcolordialog.h.

The documentation for this class was generated from the following files:

- kcolordialog.h
- kcolordialog.cpp

This file is part of the documentation for kdeui Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:20:43 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003