PHPackages                             thinfer/kmeansrgb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. thinfer/kmeansrgb

ActiveLibrary

thinfer/kmeansrgb
=================

A kmeans++ clustering algorithm for colors in R'G'B'

v1.0.0(9y ago)1272PHPPHP &gt;=5.3.0

Since Jan 12Pushed 9y agoCompare

[ Source](https://github.com/BarryShieh/KMeansRGB)[ Packagist](https://packagist.org/packages/thinfer/kmeansrgb)[ RSS](/packages/thinfer-kmeansrgb/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

KMeansRGB.php
-------------

[](#kmeansrgbphp)

利用K-Means++算法对RGB像素点群进行聚类，从而实现提取图片主题色的目的。

### 安装方法

[](#安装方法)

```
composer require thinfer/kmeansrgb

```

### 使用方法

[](#使用方法)

```
$kRgb = new \Thinfer\KMeansRGB('./test.jpg');
$colors = $kRgb->process();
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 59.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3404d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d42de3b06462893a1c19198e46582dcc5a49f5dcd739ac46579f825d9fa3b36?d=identicon)[Thinfer](/maintainers/Thinfer)

---

Top Contributors

[![seeyagain173](https://avatars.githubusercontent.com/u/15873500?v=4)](https://github.com/seeyagain173 "seeyagain173 (13 commits)")[![BarryBravo](https://avatars.githubusercontent.com/u/23718268?v=4)](https://github.com/BarryBravo "BarryBravo (9 commits)")

---

Tags

colorrgbkmeans

### Embed Badge

![Health badge](/badges/thinfer-kmeansrgb/health.svg)

```
[![Health](https://phpackages.com/badges/thinfer-kmeansrgb/health.svg)](https://phpackages.com/packages/thinfer-kmeansrgb)
```

###  Alternatives

[spatie/color

A little library to handle color conversions

38018.9M28](/packages/spatie-color)[ozdemirburak/iris

PHP library for color manipulation and conversion.

1201.7M16](/packages/ozdemirburak-iris)[ssnepenthe/color-utils

A PHP library for performing SASS-like color manipulations.

631.1M11](/packages/ssnepenthe-color-utils)[tecnickcom/tc-lib-color

PHP library to manipulate various color representations

247.2M9](/packages/tecnickcom-tc-lib-color)[gabrieldarezzo/colorizzar

Change the colors of an image without lose alpha channnel

273.7k](/packages/gabrieldarezzo-colorizzar)[fjw/color-compare

A library for converting colors (Hex, RGB, HSL, CIELAB (LAB), DIN-99) and calculating color distances based on DIN-99.

1310.0k](/packages/fjw-color-compare)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
