# How to suppress warning about color calibration

**URL:** <https://discourse.psychopy.org/t/how-to-suppress-warning-about-color-calibration/8314>\
**Category:** Coding\
**Tags:** color\
**Created:** [July 2, 2019, 4:24am UTC](https://discourse.psychopy.org/t/how-to-suppress-warning-about-color-calibration/8314 "2019-07-02T04:24:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![67981492](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/67981492/32/5236_2.png) [@67981492](https://discourse.psychopy.org/u/67981492)\
**Post date:** [July 2, 2019, 4:24am UTC](https://discourse.psychopy.org/t/how-to-suppress-warning-about-color-calibration/8314/1 "2019-07-02T04:24:47Z")

</div>

How does one suppress this warning, which is output to the terminal each time I run a task?

```auto
10.8500 WARNING This monitor has not been color-calibrated. Using default DKL conversion matrix.

```

I’m not worried about color calibration, but would like to use the DKL colorspace. Thanks!

---

<div class="post-metadata">

**Author:** ![Reiner](https://avatars.discourse-cdn.com/v4/letter/r/e47774/32.png) [@Reiner](https://discourse.psychopy.org/u/Reiner)\
**Post date:** [June 10, 2020, 5:14pm UTC](https://discourse.psychopy.org/t/how-to-suppress-warning-about-color-calibration/8314/2 "2020-06-10T17:14:53Z")

</div>

Same question here, unfortunately:  
warnings.filterwarnings(“ignore”)  
does not seem to work.

---

<div class="post-metadata">

**Author:** ![sappelhoff](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/sappelhoff/32/40305_2.png) [@sappelhoff](https://discourse.psychopy.org/u/sappelhoff)\
**Post date:** [December 5, 2023, 6:02pm UTC](https://discourse.psychopy.org/t/how-to-suppress-warning-about-color-calibration/8314/3 "2023-12-05T18:02:30Z")

</div>

Psychopy complains because you are not supplying a conversion matrix from DLK to RGB.

See here in the source code:

> <https://github.com/psychopy/psychopy/blob/148c730ccea10cb2183fdc94e843e278604b49ca/psychopy/tools/colorspacetools.py#L415-L423>

So, perhaps you can prevent the warning by supplying the “default conversion matrix” upfront.

```python
    # ... code above
    
    my_monitor = monitors.Monitor(name=MONITOR_NAME)
    # for `conversionMatrix`, see:
    # https://github.com/psychopy/psychopy/blob/148c730ccea10cb2183fdc94e843e278604b49ca/psychopy/tools/colorspacetools.py#L416-L421
    conversionMatrix = numpy.asarray([
        # (note that dkl has to be in cartesian coords first!)
        # LUMIN %L-M %L+M-S
        [1.0000, 1.0000, -0.1462], # R
        [1.0000, -0.3900, 0.2094], # G
        [1.0000, 0.0180, -1.0000], # B
        ])
    my_monitor.setDKL_RGB(conversionMatrix)

    # ... continue code

```

I haven’t tested this myself.
