---
title: "RGB To Lab Without Color Management"
canonical: https://www.graphicsmill.com/samples/ColorManagement/ConvertingColorValues/RgbToLabWithoutColorManagement_cs
product: "Graphics Mill"
source: "ColorManagement/ConvertingColorValues/RgbToLabWithoutColorManagement.cs"
---

# RGB To Lab Without Color Management

Converts a color specified in RGB color space to LAB color space without using color management.

## Instruction

Write a C# program that converts an RGB color (R=223, G=210, B=30) to LAB color space without color management using the LabColor constructor that accepts RgbColor, performing a simple mathematical approximation without ICC profiles or source color space consideration, then displays the result using Console.WriteLine.

## Usings

```csharp
using System;
```

## Code Snippet

```csharp
RgbColor rgbColor = new RgbColor(223, 210, 30);
LabColor labColor = new LabColor(rgbColor);

Console.WriteLine("Without color management: {0} to {1}", rgbColor, labColor);
```

## Explanation

Below is a C# code sample that performs RGB to LAB conversion without color management:

The code demonstrates basic RGB to LAB conversion using the LabColor constructor with RgbColor parameter, applying a simplified mathematical transformation (typically linear RGB to XYZ conversion followed by XYZ to LAB without gamma correction or profile interpretation) that assumes sRGB-like device characteristics. This produces device-dependent LAB values unsuitable for color-critical applications but useful for quick visual approximations or when color management infrastructure is unavailable.

## Tags

- [Color Conversion](<https://www.graphicsmill.com/samples/tags/color-conversion_md>): Converting colors between color spaces

## Output

- [RgbToLabWithoutColorManagement.txt](<https://www.graphicsmill.com/samples/ColorManagement/compiled/Debug/RgbToLabWithoutColorManagement_txt>) (preview)

## Used APIs

- [Aurigma.GraphicsMill.LabColor](<https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_LabColor.htm.md>)
