EasyExcel 注解fillForegroundColor

EasyExcel 注解fillForegroundColor 对应的颜色值

/**

* 样式的数据类

*

* @author leiyiDong

**/

@Data

// 头背景设置成红色 IndexedColors.RED.getIndex()

@HeadStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND, fillForegroundColor = 10)

// 头字体设置成20

@HeadFontStyle(fontHeightInPoints = 20)

// 内容的背景设置成绿色 IndexedColors.GREEN.getIndex()

@ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND, fillForegroundColor = 17)

// 内容字体设置成20

@ContentFontStyle(fontHeightInPoints = 20)

public class DemoStyleData {

// 字符串的头背景设置成粉红 IndexedColors.PINK.getIndex()

@HeadStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND, fillForegroundColor = 14)

// 字符串的头字体设置成20

@HeadFontStyle(fontHeightInPoints = 30)

// 字符串的内容的背景设置成天蓝 IndexedColors.SKY_BLUE.getIndex()

@ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND, fillForegroundColor = 40)

// 字符串的内容字体设置成20

@ContentFontStyle(fontHeightInPoints = 30)

@ExcelProperty("字符串标题")

private String string;

@ExcelProperty("日期标题")

private Date date;

@ExcelProperty("数字标题")

private Double doubleData;

}

fillForegroundColor 对应的颜色值如下图:

easy-excel

【参考:EasyExcel 注解fillForegroundColor 对应的颜色值】

相关推荐
风骏时光牛马9 分钟前
VHDL十大经典基础功能设计实例代码合集
前端
plainGeekDev11 分钟前
单例模式 → object 声明
android·java·kotlin
小兔崽子去哪了13 分钟前
Vue3 + Pinia 集成 IGV.js 实现 BAM 文件在线浏览
javascript·vue.js·后端
hunterandroid17 分钟前
Notification 通知:从基础到渠道适配
前端
孟陬19 分钟前
Claude Code 巧思 `Ctrl+S` 暂存键
前端·后端
PedroQue9934 分钟前
V1.6.1性能优化:高频路径提速与代码精简
前端·uni-app
猩猩程序员1 小时前
将 LiteLLM 迁移到 Rust —— 构建最快、最轻量的 AI Gateway
前端
小月土星1 小时前
JavaScript 快速排序:从 pivot、双指针到分治思想
javascript·算法·面试
lichenyang4531 小时前
JSBridge 分发升级:为什么要从 if-else 变成 Registry > 这是「ASCF 架构升级」系列的第 3 篇
前端
小月土星1 小时前
JavaScript 递归入门:从 1 到 n 求和,再到数组扁平化
javascript·算法·面试