G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
Banner Institutions GREYC CNRS ENSICAEN UNICAEN

A Full-Featured Open-Source Framework for Image Processing



Latest stable version: 4.0.4 (2026/08/19)

Reference
Table of Contents  ▸  List of Commands  ▸  Reptorian's Commands  ▸  rep_count_colors◀  rep_img2freqsortvals    |    rep_colormap  ▶

rep_count_colors

Arguments:

  • _count_until={ 0:None | >0:Max number of counted colors }

Description:

Count number of distinct colors in selected images until it reaches the specified max number of counted colors.

Set count_until to 0 to disable limit on counted colors.
This command returns the number of distinct colors for each image (separated by commas).
Note: Images with colors above the _count_until will result in _count_until+1 unless _count_until is 0.

Default values:

_count_until=0

G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing

G'MIC is an open-source software distributed under the CeCILL free software licenses (LGPL-like and/or
GPL-compatible). Copyrights (C) Since July 2008, David Tschumperlé - GREYC UMR CNRS 6072, Image Team.