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 对应的颜色值】

相关推荐
李剑一3 分钟前
别再写易破解的Canvas水印了!MutationObserver防篡改水印,从原理到完整代码(直接复制)
前端
小谢小哥3 分钟前
51-限流算法详解
java·后端·架构
1candobetter6 分钟前
JAVA后端开发——多模块项目重命名体系解析
java·开发语言·intellij-idea
RainCity10 分钟前
Java Swing 自定义组件库分享(二)
java·笔记
程序员老邢12 分钟前
【产品底稿 06】商助慧V1.2实战复盘:Milvus向量库重构+RAG仿写升级+前端SSE排版彻底修复
java·人工智能·经验分享·spring boot·ai·milvus
Beginner x_u12 分钟前
前端八股整理(工程化 01)|Git 常见命令、rebase/merge、pull/fetch 与前端性能优化
前端·性能优化·git 常见命令
Bat U13 分钟前
JavaEE|多线程(四)
java·开发语言
白日梦想家68114 分钟前
实战避坑+性能对比,for与each循环选型指南
开发语言·前端·javascript
budingxiaomoli19 分钟前
SpringBoot快速上手
java·spring boot·后端
帅帅哥的兜兜20 分钟前
猪齿鱼:实现table分页勾选
前端·javascript·vue.js