Hi @Nicky G. This script will make a new document with RGB swatches from a hex list saved as a .txt file on your desktop—it expects just the hex value (no # prefix) in this format:
e0cffc
c29ffa
a370f7
8540f5
The swatches get saved in a color group named sRGB HEX, and from there you can save an .ASE file from the Swatches panel
var hc = readFile("~/Desktop/HexColors.txt")
//an array of hex values (no # prefix)
var hexList = hc.split("\n")
//a new document with sRGB as its assigned RGB profile
var d = app.documents.add();
app.activeDocument.rgbProfile="sRGB IEC61966-2.1"
//remove default swatches
var us = d.unusedSwatches
for (var i = 0; i < us.length; i++){
us[i].remove()
};
//make a new color group named HEX
var cg = makeColorGroup(d, "sRGB HEX")
//create RGB swatches with HEX names from the hexList array
var ns;
for (var i = 0; i < hexList.length; i++){
ns = makeSwatch(d, hexList[i], cg)
ns.properties = {model:ColorModel.PROCESS, space:ColorSpace.RGB, colorValue:hexToRgb(hexList[i])}
};
/**
* Gets the RGB values as an array from the provided hex value
* @ param the hex value
* @ return array of RGB values
*/
function hexToRgb(hx) {
var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hx);
var a = [];
var i = 3;
while (i--) a.unshift(parseInt(r[i+1], 16));
return a
}
/**
* Makes a new named Swatch
* @ param d document
* @ param color name
* @ param group name
* @ return the new swatch
*/
function makeSwatch(d, n, cg){
if (d.colors.itemByName(n).isValid) {
return d.colors.itemByName(n);
} else {
return d.colors.add({name:n, parentColorGroup:cg});
}
}
/**
* Makes a new color group
* @ param d document
* @ param n group name
* @ return the new group
*
*/
function makeColorGroup(d, n){
if (d.colorGroups.itemByName(n).isValid) {
return d.colorGroups.itemByName(n);
} else {
return d.colorGroups.add({name:n});
}
}
/**
* Read a text file
* @ param p the path to the text file
* @ return the file‘s text
*/
function readFile(p) {
var f = new File(p);
f.open("r");
var x = f.read();
f.close();
return x; //returns the text in the file sampletext.txt
}
After running:

Also, HEX is an RGB notation, so there isn’t a CMYK equivalent. You can convert RGB Hex colors to CMYK, but the resulting values depend on the source RGB profile and the destination CMYK profile which could be anything.
You can convert HEX values to CMYK on an Export to PDF by setting a Output tab’s Destination to a CMYK profile, which will color manage the conversion into the chosen CMYK space during the export.