---
Product: Aspose.Slides
Platform: java
Page Type: reference
Canonical URL: https://reference.aspose.org/slides/java/colorformat
---

# ColorFormat

## Overview

`ColorFormat` is a class in Aspose.Slides FOSS for Java.
Inherits from: `IColorFormat`, `IFillParamSource`.

Represents a color used in a presentation.

This class declares 28 methods for ColorFormat objects in Java programs.
Available methods include: `ColorFormat`, `getB`, `getColor`, `getColorType`, `getFloatB`, `getFloatG`, `getFloatR`, `getG`, `getHue`, `getLuminance`, `getPresetColor`, `getR`, and 15 additional methods.
Public members are accessible to any Java application after installing the Aspose.Slides FOSS for Java package.
Properties: `b`, `color`, `colorType`, `floatB`, `floatG`, `floatR`, and 7 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `colorType` | `ColorType` | Read/Write | Gets or sets the color type. |
| `color` | `Color` | Read/Write | Gets or sets the color. |
| `presetColor` | `PresetColor` | Read/Write | Gets or sets the preset color. |
| `schemeColor` | `SchemeColor` | Read/Write | Gets or sets the scheme color. |
| `r` | `int` | Read/Write | Gets or sets the r. |
| `g` | `int` | Read/Write | Gets or sets the g. |
| `b` | `int` | Read/Write | Gets or sets the b. |
| `floatR` | `float` | Read/Write | Gets or sets the float r. |
| `floatG` | `float` | Read/Write | Gets or sets the float g. |
| `floatB` | `float` | Read/Write | Gets or sets the float b. |
| `hue` | `float` | Read/Write | Gets or sets the hue. |
| `saturation` | `float` | Read/Write | Gets or sets the saturation. |
| `luminance` | `float` | Read/Write | Gets or sets the luminance. |

## Methods

| Signature | Description |
|-----------|-------------|
| `ColorFormat(parentElement: Element, saveCallback: Runnable)` | Creates a new ColorFormat backed by the given parent XML element. |
| `ColorFormat(parentElement: Element)` | Creates a new ColorFormat backed by the given parent XML element with no save callback. |
| `getColorType()` → `ColorType` | Returns the color type. |
| `setColorType(value: ColorType)` | Sets the color type value. |
| `getColor()` → `Color` | Returns the color. |
| `setColor(value: Color)` | Sets the color value. |
| `getPresetColor()` → `PresetColor` | Returns the preset color. |
| `setPresetColor(value: PresetColor)` | Sets the preset color value. |
| `getSchemeColor()` → `SchemeColor` | Returns the scheme color. |
| `setSchemeColor(value: SchemeColor)` | Sets the scheme color value. |
| `getR()` → `int` | Returns the r. |
| `setR(value: int)` | Sets the r value. |
| `getG()` → `int` | Returns the g. |
| `setG(value: int)` | Sets the g value. |
| `getB()` → `int` | Returns the b. |
| `setB(value: int)` | Sets the b value. |
| `getFloatR()` → `float` | Returns the float r. |
| `setFloatR(value: float)` | Sets the float r value. |
| `getFloatG()` → `float` | Returns the float g. |
| `setFloatG(value: float)` | Sets the float g value. |
| `getFloatB()` → `float` | Returns the float b. |
| `setFloatB(value: float)` | Sets the float b value. |
| `getHue()` → `float` | Returns the hue. |
| `setHue(value: float)` | Sets the hue value. |
| `getSaturation()` → `float` | Returns the saturation. |
| `setSaturation(value: float)` | Sets the saturation value. |
| `getLuminance()` → `float` | Returns the luminance. |
| `setLuminance(value: float)` | Sets the luminance value. |

## See Also

- [Aspose.Slides — Enterprise API Reference](https://reference.aspose.com/slides/)