diff --git a/.deadcode-out b/.deadcode-out
index ed1f49da9b..dc4aa0e498 100644
--- a/.deadcode-out
+++ b/.deadcode-out
@@ -222,7 +222,6 @@ package "code.gitea.io/gitea/modules/markup/markdown"
 	func IsSummary
 	func IsTaskCheckBoxListItem
 	func IsIcon
-	func IsColorPreview
 	func RenderRawString
 
 package "code.gitea.io/gitea/modules/markup/markdown/math"
diff --git a/modules/markup/markdown/ast.go b/modules/markup/markdown/ast.go
index 72d32600f5..7f0ac6a92c 100644
--- a/modules/markup/markdown/ast.go
+++ b/modules/markup/markdown/ast.go
@@ -174,10 +174,3 @@ func NewColorPreview(color []byte) *ColorPreview {
 		Color:      color,
 	}
 }
-
-// IsColorPreview returns true if the given node implements the ColorPreview interface,
-// otherwise false.
-func IsColorPreview(node ast.Node) bool {
-	_, ok := node.(*ColorPreview)
-	return ok
-}