# Help Understanding Patterns

**URL:** <https://forum.electromage.com/t/help-understanding-patterns/330>\
**Category:** Patterns and Code\
**Created:** [April 23, 2020, 1:13am UTC](https://forum.electromage.com/t/help-understanding-patterns/330 "2020-04-23T01:13:42Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Scruffynerf](https://forum.electromage.com/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@Scruffynerf](https://forum.electromage.com/u/Scruffynerf)\
**Post date:** [December 8, 2020, 12:34am UTC](https://forum.electromage.com/t/help-understanding-patterns/330/7 "2020-12-08T00:34:37Z")

</div>

So I did some researching into [LED gamma correction](https://learn.adafruit.com/led-tricks-gamma-correction/the-issue) and then realized that using v (which is 0…1, not 0-255) meant the table approach was awkward (but doable), but decided to compare the v\*v (and v \* v \* v) approach to the results from the gamma 2.8 version of the 0-255 table (converted to 0…1 format for v), and behold:

![Screen Shot 2020-12-07 at 7.25.05 PM](https://forum.electromage.com/uploads/default/original/1X/265fde7ff51ae251bd543a7902b5cb7e0df89288.png)

v \* v \* v is so close as to make no difference, while v\*v isn’t quite as good but is probably ‘good enough’ for most purposes.

While it might be nice if @wizard added a gamma function (especially for higher bits/HDR) for speed purposes, so long as you are ok with cubing v, you might as well do that.

---

_[View the full topic](https://forum.electromage.com/t/help-understanding-patterns/330)._
