cake
/
libg1m
Archived
1
0
Fork 0
This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
libg1m/include/libg1m/color.h

39 lines
1.6 KiB
C

/* ************************************************************************** */
/* _____ _ */
/* libg1m/color.h |_ _|__ _ _| |__ ___ _ _ */
/* | Project: libg1m | |/ _ \| | | | '_ \ / _ \ | | | */
/* | | (_) | |_| | | | | __/ |_| | */
/* By: thomas <thomas@touhey.fr> |_|\___/ \__,_|_| |_|\___|\__, |.fr */
/* Last updated: 2016/11/21 09:32:56 |___/ */
/* */
/* ************************************************************************** */
#ifndef LIBG1M_COLOR_H
# define LIBG1M_COLOR_H
/* This header is about colors in e-activities for fx-CG calculators.
*
* For each text line, there can be a "color zone" that has the same size as
* the content. Each byte is organized as 0xMC, where 'M' is the marker color
* (background color) whereas 'C' is the character color.
*
* These colors are the following: */
typedef int g1m_color_t;
# define g1m_color_black 0x0
# define g1m_color_blue 0x1
# define g1m_color_green 0x2
# define g1m_color_cyan 0x3
# define g1m_color_red 0x4
# define g1m_color_magenta 0x5
# define g1m_color_yellow 0x6
# define g1m_color_white 0x7
/* And here are some macros to help you out: */
# define g1m_marker_color(C) (((C) & 0xf0) >> 4)
# define g1m_char_color(C) ((C) & 0xf)
# define g1m_character_color(C) g1m_char_color(C)
#endif /* LIBG1M_COLOR_H */