Here is another example with a code that does not use dependencies (only with the base of the R).
In your example, 456 is the same code used for YELLOW and BROWN. I created another code (457 for BROWN) to avoid duplicates (but I do not know if that was your intention).
First, I define the rule to complete the missing data with a match of the NAs in df1 that may be present in df2. And then I apply the rule on the dataframe df1
df1 <- data.frame(ITEM = c(123,456,789,234,345,457,567,678),
CLASS = c("AZUL","AMARELO",NA,"VERDE","PRETO",NA,NA,"ROSA"),
stringsAsFactors = FALSE)
df2 <- data.frame(ITEM = c(457, 567,100,200, 789),
CLASS = c("MARROM","BRANCO","CASA","BOLA","LARANJA"),
stringsAsFactors = FALSE)
r <- match(df1[is.na(df1$CLASS), "ITEM"], df2$ITEM)
df1[is.na(df1$CLASS), "CLASS" ] <- df2[r, "CLASS"]
print(df1)
ITEM CLASS
1 123 AZUL
2 456 AMARELO
3 789 LARANJA
4 234 VERDE
5 345 PRETO
6 457 MARROM
7 567 BRANCO
8 678 ROSA