Freeciv-3.2
Loading...
Searching...
No Matches
Functions
colors.c File Reference
#include <stdio.h>
#include <gtk/gtk.h>
#include "log.h"
#include "mem.h"
#include "rgbcolor.h"
#include "gui_main.h"
#include "colors.h"

Go to the source code of this file.

Functions

struct colorcolor_alloc (int r, int g, int b)
 
void color_free (struct color *color)
 
int color_brightness_score (struct color *pcolor)
 

Function Documentation

◆ color_alloc()

struct color * color_alloc ( int  r,
int  g,
int  b 
)

Allocate a color (well, sort of) and return a pointer to it.

Definition at line 38 of file colors.c.

Referenced by ensure_color(), load_gfxnumber(), and pixmap_put_overlay_tile_draw().

◆ color_brightness_score()

int color_brightness_score ( struct color pcolor)

Return a number indicating the perceptual brightness of this color relative to others (larger is brighter).

Definition at line 62 of file colors.c.

Referenced by color_best_contrast().

◆ color_free()

void color_free ( struct color color)

Free a previously allocated color. See color_alloc.

Definition at line 53 of file colors.c.

Referenced by fc_interface_init_client(), load_gfxnumber(), pixmap_put_overlay_tile_draw(), and theme_color_system_free().