File: color.rst

package info (click to toggle)
cglm 0.9.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,332 kB
  • sloc: ansic: 36,253; makefile: 289; python: 51; sh: 10
file content (34 lines) | stat: -rw-r--r-- 836 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.. default-domain:: C

color
================================================================================

Header: cglm/color.h

Table of contents (click to go):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Functions:

1. :c:func:`glm_luminance`

Functions documentation
~~~~~~~~~~~~~~~~~~~~~~~

.. c:function:: float  glm_luminance(vec3 rgb)

    | averages the color channels into one value

    This function uses formula in COLLADA 1.5 spec which is

    .. code-block:: text

       luminance = (color.r * 0.212671) +
                   (color.g * 0.715160) +
                   (color.b * 0.072169)

    It is based on the ISO/CIE color standards (see ITU-R Recommendation BT.709-4),
    that averages the color channels into one value

    Parameters:
      | *[in]*  **rgb**   RGB color