Y = a * R + b * G + c * B
Cb = (B - Y) / d
Cr = (R - Y) / e
| BT.601 | BT.709 | BT.2020 | |
|---|---|---|---|
| a | 0.299 | 0.2126 | 0.2627 |
| b | 0.587 | 0.7152 | 0.6780 |
| /** | |
| * MIT No Attribution | |
| * | |
| * Copyright 2020-2024 Anna Zhukova | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
| * software and associated documentation files (the "Software"), to deal in the Software | |
| * without restriction, including without limitation the rights to use, copy, modify, | |
| * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | |
| * permit persons to whom the Software is furnished to do so. |
Y = a * R + b * G + c * B
Cb = (B - Y) / d
Cr = (R - Y) / e
| BT.601 | BT.709 | BT.2020 | |
|---|---|---|---|
| a | 0.299 | 0.2126 | 0.2627 |
| b | 0.587 | 0.7152 | 0.6780 |
| // "License": Public Domain | |
| // I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like. | |
| // In case there are jurisdictions that don't support putting things in the public domain you can also consider it to | |
| // be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it | |
| // an example on how to get the endian conversion functions on different platforms. | |
| #ifndef PORTABLE_ENDIAN_H__ | |
| #define PORTABLE_ENDIAN_H__ | |
| #if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__) |
| #!/usr/bin/env zsh | |
| killall -SIGSTOP i3 | |
| urxvt -geometry 100x2 -name "flub" -e tmux -L CNTR& | |
| sleep 1 | |
| ID=0x`xwininfo -root -tree | grep "flub" | sed -e 's/.*0x//' -e 's/ .*//'` | |
| SCRNWDT=`xrandr | grep \* | sed -e 's/x.*//' -e 's/^ *//'` | |
| xprop -id $ID -f _NET_WM_STRUT_PARTIAL 32cccccccccccc -set _NET_WM_STRUT_PARTIAL "0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, $SCRNWDT" | |
| xprop -id $ID -f _NET_WM_WINDOW_TYPE 32a -set _NET_WM_WINDOW_TYPE _NET_WM_WINDOW_TYPE_DOCK | |
| tmux -L CNTR send-keys 'countup-bin $COLUMNS 5' "Enter" | |
| tmux -L CNTR set-option -g status off |