# getMainColor.js **Repository Path**: jackchanel/getMainColor.js ## Basic Information - **Project Name**: getMainColor.js - **Description**: 适用于微信小程序一款图片主色取色器,返回rgba值。做了模块化封装,提供了简单的实例。灵感来源于 Ele-Peng/miniprogram-pallet 项目。 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-09-01 - **Last Updated**: 2021-09-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # getMainColor.js * easyColor.js 根据 GitHub 上 Ele-Peng/miniprogram-pallet 项目所封装。 * 适配于微信小程序,用于取图片主色调的工具。 * 更新仓库地址:https://github.com/Labraff/getMainColor.js.git * * 基本参数 * @imgPath 图片路径 * @res canvas上下文 * * 使用方法 * promise回调 * mainGetColor(res,imgPath).then((res) =>{ // do anything })