| 1 | /* |
| 2 | * $Id: COLORREF.java,v 1.1.1.5 2004/05/25 20:23:20 hastings Exp $ |
| 3 | * |
| 4 | * (c) Copyright, Moebius Solutions, Inc., 2004 |
| 5 | * |
| 6 | * All Rights Reserved |
| 7 | * |
| 8 | * This material may be reproduced by or for the U. S. Government |
| 9 | * pursuant to the copyright license under the clause at |
| 10 | * DFARS 252.227-7014 (OCT 2001). |
| 11 | */ |
| 12 | |
| 13 | package com.moesol.bindings.platform_sdk.windows_api; |
| 14 | |
| 15 | /** |
| 16 | * @author Robert Hastings |
| 17 | */ |
| 18 | public class COLORREF { |
| 19 | |
| 20 | public static int RGB(int r, int g, int b) { |
| 21 | return r | (g << 8) | (b << 16); |
| 22 | } |
| 23 | public static int getRed(int colorref) { |
| 24 | return colorref & 0xFF; |
| 25 | } |
| 26 | public static int getGreen(int colorref) { |
| 27 | return (colorref >> 8) & 0xFF; |
| 28 | } |
| 29 | public static int getBlue(int colorref) { |
| 30 | return (colorref >> 16) & 0xFF; |
| 31 | } |
| 32 | } |