-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathargb.h
More file actions
26 lines (22 loc) · 730 Bytes
/
Copy pathargb.h
File metadata and controls
26 lines (22 loc) · 730 Bytes
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
/*++
Copyright (c) Microsoft Corporation
Licensed under the MIT license.
Module Name:
- argb.h
Abstract:
- Replaces the RGB macro with one that fills the highest order byte with 0xff.
We use this for the cascadia project, because it can have colors with an
alpha component. For code that is alpha-aware, include this header to make
RGB() fill the alpha byte. Otherwise, colors made with RGB will be transparent.
Author(s):
- Mike Griese (migrie) Feb 2019
--*/
#pragma once
constexpr COLORREF ARGB(const BYTE a, const BYTE r, const BYTE g, const BYTE b) noexcept
{
return (a<<24) | (b<<16) | (g<<8) | (r);
}
#ifdef RGB
#undef RGB
#define RGB(r, g, b) (ARGB(255, (r), (g), (b)))
#endif